---------------------------------------- WordBASIC Help Cardfile ........................................ This cardfile is designed to provide quick access to the functions and syntax of WordBASIC. It was derived from the TECHREF.DOC file included with Word for Windows. References: WTR-Word for Windows Technical Reference Compiled by Steve Ahola (73727,3715) ---------------------------------------- ---------------------------------------- Auto Macros ........................................ Word reserves special names for macros you can create to alter aspects of Word's behavior. These are called "auto macros". Word recognizes a macro whose name begins with "Auto" as a macro that runs automatically when the situation it applies to arises. You supply the actual steps for the auto macro. ---------------------------------------- ---------------------------------------- Auto Macros (more) ........................................ You can prevent an auto macro from running by holding down the Shift key when you perform the action that triggers the macro. ---------------------------------------- ---------------------------------------- Auto Macros (Definitions) ........................................ AutoExec: runs when you start Word.Use /m switch to disable AutoExec macro. AutoNew: runs after you create a new document based on the current template. AutoOpen: runs after you open a file. AutoClose:runs when you close a document AutoExit:runs when you quit Word. ---------------------------------------- ---------------------------------------- Data Types ........................................ WordBASIC supports two basic data types: strings and numbers. Word uses double-precision, floating-point numbers. Strings can contain up to 32,000 characters, depending on the amount of memory available. (If a macro uses dialog boxes or commands that use dialog boxes, a third data type is available, the dialog record.) ---------------------------------------- ---------------------------------------- Expressions ........................................ Word can evaluate complex numeric and string expressions. An expression is any valid combination of variables, numbers or strings, and functions that evaluate down to a single result. This result can be a number, a string, or, in the case of logical expressions, a True or False condition. (In WordBASIC all logical expressions return -1 if True and 0 if false.) At its simplest, an expression is only one of these items ---------------------------------------- ---------------------------------------- Expressions (more) ........................................ An expression can also consist of several elements in combination: Page1Lines + Page2Lines "The " + CarName$ + "automobile is the best seller this week" (2 * Pi) * Radius (Rain Or Snow) And (Hail Or Sleet) Int((365 - Days) / 7) FirstQtr + SecondQtr + ThirdQtr + FourthQtr > LastYear ---------------------------------------- ---------------------------------------- Expressions (still more) ........................................ You can use an expression anywhere that a constant or a variable can be used, as in these examples: Print Left$(FirstName$,1) + ". " + LastName$ LineDown ParaLong + 1, Switch If Profit > 0 and Month$ = "Jan" Then Print "Good Year!" ---------------------------------------- ---------------------------------------- Numeric Expessions ........................................ Bitwise operators (Not, And, and Or) convert numbers to 16-bit integers and then process the individual bits of the number in binary format. Not of -1 is False. Not of any other number, including 0 (zero), is True. There- fore, be careful when using bitwise operators with non-Boolean functions. Multiplication and division is performed before addition and sub- traction unless parentheses are used. ---------------------------------------- ---------------------------------------- Operators ........................................ = Tests if two variables are equal <> Tests if two variables are not equal > Tests if 1st var is greater than 2nd < Tests if 1st var is less than 2nd <= Tests if 1st variable is less than or equal to 2nd variable => Tests if 1st variable is greater than or equal to 2nd variable Note: These operators also work on string variables using ASCII values. ---------------------------------------- ---------------------------------------- Statements and Functions ........................................ WordBASIC includes both statements and functions. A statement performs an action, such as italicizing text. A function produces, or "returns," a number or a set of characters that represent information. Functions appear in the text with parentheses () following them. ---------------------------------------- ---------------------------------------- Statements and Functions (more) ........................................ WordBASIC includes three types of statements and functions: 1. utility statements and functions 2. BASIC statements and functions 3. dialog control definition statements These statements and functions are described in more detail in WTR (Macros: Reference). ---------------------------------------- ---------------------------------------- Variables ........................................ Variables are usually local to the subroutine or function in which they are used. If your macro consists of several subroutines or functions and you want to make a variable globally available to subroutines and functions within the macro, declare them with a Dim statement located outside the Sub MAIN. If you want to permanently store variables, store them in a file or glossary. ---------------------------------------- ---------------------------------------- Variables (more) ........................................ String variables must have a trailing dollar sign; for example, Name$. Numeric variable names require no special character. Unlike standard BASIC, WordBASIC does not support integer variables. Word does support multidimensional arrays of strings or values. Array variables are declared with the Dim statement and can be redimensioned with the Redim statement. ---------------------------------------- ---------------------------------------- DlgBox Basics ........................................ A dialog record consists of a list of "fields." Each field in a dialog record contains the value of an element in the dialog box; the value is a number in some cases and a string in others. Some dialog record fields can accept either a number or a string (in these cases, Word converts a string such as "1 in" to printer's points.) These fields are followed by [$] here, which is NOT to be included. ---------------------------------------- ---------------------------------------- DlgBox Basics (more) ........................................ You can set or read a specific field of a dialog record by specifying the field name, preceded by a period (.). Dim can be used to dimension dialog records. The syntax follows: Dim DialogRecord As DialogBox (Dim allocates to DialogRecord the storage space and associated field types for DialogBox.) Use GetCurValues to copy the current elements of a dialogbox to a dialog record. ---------------------------------------- ---------------------------------------- DlgBox Coordinates ........................................ In the syntax lines, the following arguments are used: x = Hor pos. of the item in 1/8 SFCWU y = Vert. pos. of the item in 1/12 SFCWU dx = Width of the item in 1/4 SFCWU dy = Height of the item in 1/8 SFCWU (SFCWU = system font character width units) ---------------------------------------- ---------------------------------------- DlgBox Example ........................................ Sub MAIN Dim dlg As FormatDocument GetCurValues dlg If dlg.MirrorMargins = 0 Then dlg.MirrorMargins = 1 Else dlg.MirrorMargins = 0 Dialog dlg FormatDocument dlg End Sub ---------------------------------------- ---------------------------------------- DlgBox: Begin Dialog ........................................ Syntax: Begin Dialog UserDialog [x, y,] dx, dy Starts the dialog box declaration. The dx and dy arguments are the width and height of the dialog box (relative to the given x and y coordinates). If x and y are not supplied, then the dlg box is positioned automatically by Word at the point where dialog boxes usually appear on the screen. ---------------------------------------- ---------------------------------------- DlgBox: CheckBox ........................................ Syntax: CheckBox x, y, dx, dy, Text$, .Field Creates a check box. When the dialog box is used .Field contains current setting. If the value is 0, the box is not checked; any other value means the box is checked.The result is a numeric field with the value 0 (not checked) or 1 (checked) or -1 (grayed) in the dialog record returned from Dialog. ---------------------------------------- ---------------------------------------- DlgBox: ComboBox ........................................ Syntax: ComboBox x, y, dx, dy, Array_Variable$, .Field Creates an expanded combo box with the list box filled from the Array_Variable$. When the dialog box is used, .field contains the current setting, your selected string, returned from Dialog. ---------------------------------------- ---------------------------------------- DlgBox: Dialog ........................................ Syntax: Dialog DialogRecord Displays the dialog box specified by DialogRecord for editing. After editing, you can store edits in DialogRecord by choosing OK or lose edits by choosing Cancel. Choosing Cancel produces a run-time error that you can trap with On Error. ---------------------------------------- ---------------------------------------- DlgBox: End Dialog ........................................ Syntax: End Dialog Ends the definition of the dialog box. ---------------------------------------- ---------------------------------------- DlgBox: ListBox ........................................ Syntax: ListBox x, y, dx, dy, Array_Variable$, .Field Creates a list box control filled with the strings in Array_Variable$. When the dialog box is used, .Field contains the current setting, the index of your selected choice, returned from Dialog. ---------------------------------------- ---------------------------------------- DlgBox: OKButton and CancelButton ........................................ Syntax: OKButton x, y, dx, dy Syntax: CancelButton x, y, dx, dy If you choose the OK button, the macro continues. If you choose the Cancel button, an error is generated. This error can be trapped with On Error. For more information on On Error, see WTR (Macros: Introduction). ---------------------------------------- ---------------------------------------- DlgBox: OptionGroup and OptionButton ........................................ Syn: OptionGroup .Field Syn: OptionButton x, y, dx, dy, Text$ OptionGroup begins the definition of a series of related option buttons. Within the group only one button may be active (on) at a time. The .Field argument is set to a value between 0 (zero) and n, which represents the value of the currently active button. ---------------------------------------- ---------------------------------------- DlgBox: Text ........................................ Syntax: Text x, y, dx, dy, Text$ Creates a box of static text. Text does not have a result. Text statement must precede the dialog box control it is associated with. ---------------------------------------- ---------------------------------------- DlgBox: TextBox ........................................ Syntax: TextBox x, y, dx, dy, .Field Creates an edit control. ---------------------------------------- ---------------------------------------- Abs() ........................................ Syntax: Num = Abs(n) Returns the unsigned value of n. ---------------------------------------- ---------------------------------------- Activate ........................................ Syntax: Activate WindowText$, [PaneNum] Activates the window whose title bar is specified by WindowText$. PaneNum (when specified): 1 or 2 activates top pane 3 or 4 activates bottom pane ---------------------------------------- ---------------------------------------- AppActivate ........................................ Syntax: AppActivate WindowText$, [Immediate] Activates the application whose title bar is specified by WindowText$. Immediate (when supplied): 0 Word flashes title bar, waits for response and then activates app. 1 Word immediately shifts focus to other application. ---------------------------------------- ---------------------------------------- AppInfo$() ........................................ Syntax: A$ = AppInfo$ (TypeOfInfo) Returns information about the state of Word. Values are returned as strings. Use Val(AppInfo$(n)) to convert the string to a number if appropriate. 1 Win ver 7 Ht doc 13 NCP (-1) 2 WfW ver 8 WinMax (-1) 14 Mouse(-1) 3 WfW mode 9 Tot conv RAM 15 Avl hd sp 4 Xpos WfW 10 Avl conv RAM NOTE: 5 Ypos WfW 11 Tot exp RAM 4-7 are in 6 Width doc 12 Avl exp RAM points(pts) ---------------------------------------- ---------------------------------------- AppMaximize ........................................ Syntax: AppMaximize Zooms the Word window to full screen size. ---------------------------------------- ---------------------------------------- AppMaximize() ........................................ Syntax: Log = AppMaximize() Returns a nonzero value if the window is maximized. ---------------------------------------- ---------------------------------------- AppMinimize ........................................ Syntax: AppMinimize Minimizes the Word window to an icon. ---------------------------------------- ---------------------------------------- AppMinimize() ........................................ Syntax: Log = AppMinimize() Returns a nonzero value if the window is minimized. ---------------------------------------- ---------------------------------------- AppMove ........................................ Syntax: AppMove XPos, YPos Moves the Word window to XPos, YPos relative to the top left of the screen. Values are in points. ---------------------------------------- ---------------------------------------- AppRestore ........................................ Syntax: AppRestore Restores the Word window from a max- imized or minimized state. ---------------------------------------- ---------------------------------------- AppSize ........................................ Syntax: AppSize XPos, YPos Resizes the Word window. Values are in points. If Window is maximized or minimized this command is not available. (Add AppRestore immediately before this command to insure that window is not zoomed or iconized). ---------------------------------------- ---------------------------------------- Asc() ........................................ Syntax: Num = Asc(A$) Returns the ANSI character code of the first character in A$. ---------------------------------------- ---------------------------------------- Beep ........................................ Syntax: Beep [Beeptype] Causes the computer's speaker to beep. Beeptype is 1, 2, 3, or 4. If Beeptype is omitted,it is assumed to be 1. The exact tone produced will depend on your hardware configuration. A typical use of Beep is to signal the end of a macro. ---------------------------------------- ---------------------------------------- Bold ........................................ Syntax: Bold [On] Without the argument, toggles bold for the entire selection. If On is non- zero, makes the entire selection bold. If On is 0 (zero), removes bold from the entire selection. ---------------------------------------- ---------------------------------------- Bold() ........................................ Syntax: Num = Bold() Returns 0 (zero) if none of the selection is bold, 1 if all of the selection is bold, or -1 if part of the selection is bold. ---------------------------------------- ---------------------------------------- BookmarkName$() ........................................ Syntax: A$ = BookmarkName$(Count) Returns the name of the bookmark. Count must be in the range from 1 to CountBookmarks(). ---------------------------------------- ---------------------------------------- Call ........................................ Syntax:[Call] Subname [ParameterList] Transfers control to a subroutine. ---------------------------------------- ---------------------------------------- Cancel ........................................ Syntax: Cancel Terminates a mode such as Column- Select and does not perform the action. See "OK" later in this section. ---------------------------------------- ---------------------------------------- CenterPara ........................................ Syntax: CenterPara Centers the currently selected paragraph(s). ---------------------------------------- ---------------------------------------- CenterPara() ........................................ Syntax: Num = CenterPara() Returns Num based on selection: 0 if no paragraphs are centered 1 if all paragraphs are centered -1 if more than one kind of paragraph alignment is used ---------------------------------------- ---------------------------------------- ChangeCase ........................................ Syntax: ChangeCase [Type] Without an argument, alternates the case of the current selection between all lowercase, all caps, and initial caps based on the first two characters of the selection. Type = 0 All lowercase Type = 1 All caps Type = 2 Initial caps ---------------------------------------- ---------------------------------------- ChangeRulerMode ........................................ Syntax: ChangeRulerMode Cycles the ruler between Paragraph, Table, and Document modes. ---------------------------------------- ---------------------------------------- CharColor ........................................ Syntax: CharColor Color Sets the character color of the sel- ection to Color, which may be one of the following: 0 Auto 5 Magenta 1 Black 6 Red 2 Blue 7 Yellow 3 Cyan 8 White 4 Green (Auto is set by Control Panel) ---------------------------------------- ---------------------------------------- CharColor() ........................................ Syntax: Num = CharColor() Returns the numbers set by the Char- Color statement, or -1 if all the selected text is not the same color. See CharColor. ---------------------------------------- ---------------------------------------- CharLeft ........................................ Syntax: CharLeft [Repeat], [Select] Moves the selection left by Repeat characters. If the repeat argument is omitted, 1 is assumed. If Select is nonzero, the selection is extended to the left or right by Repeat characters. ---------------------------------------- ---------------------------------------- CharLeft() ........................................ Syntax: Log = CharLeft([Repeat], [Select]) Moves the selection left by Repeat characters. Returns 0 (zero) if the action cannot be performed. ---------------------------------------- ---------------------------------------- CharRight ........................................ Syntax: CharRight [Repeat], [Select] Moves the selection right by Repeat characters. If the Repeat argument is omitted, 1 is assumed. If Select is nonzero, the selection is extended to the right by Repeat characters. If Select is 0 (zero) or omitted, the selection is not extended. ---------------------------------------- ---------------------------------------- CharRight() ........................................ Syntax: Log = CharRight([Repeat], [Select]) Moves the selection right by Repeat characters. Returns 0 (zero) if the action cannot be performed. ---------------------------------------- ---------------------------------------- ChDir ........................................ Syntax: ChDir Name$ Changes directories to the one specified by Name$. ---------------------------------------- ---------------------------------------- Chr$() ........................................ Syntax: A$ = Chr$(AnsiCode) Returns the character whose ANSI code is AnsiCode. ---------------------------------------- ---------------------------------------- Close ........................................ Syntax: Close [[#]StreamNumber] Closes the file attached to Stream- Number. If StreamNumber is not sup- lied, all open files are closed. ---------------------------------------- ---------------------------------------- ClosePane ........................................ Syntax: ClosePane Closes the current window pane. You use this statement to close a pane in a split document, a header/footer pane, a footnote pane, etc. This does not close a document window, only a pane in a window. ---------------------------------------- ---------------------------------------- CloseUpPara ........................................ Syntax: CloseUpPara Makes the space before and after the selected paragraph 0 (zero). ---------------------------------------- ---------------------------------------- CmpBookmarks() ........................................ Syntax: Num = CmpBookmarks (Bookmark1$, Bookmark2$) Compares two named bookmarks and returns one of the following values between 0 and 13. See WTR for details. ---------------------------------------- ---------------------------------------- ColumnSelect ........................................ Syntax: ColumnSelect Starts the column selection mode. Cancel ends this mode. ---------------------------------------- ---------------------------------------- ControlRun ........................................ Syntax: ControlRun Application Equivalent to the Control Run dialog box. Runs an application from the Word Control menu. ControlRun 0 runs Clipboard ControlRun 1 runs Control Panel ---------------------------------------- ---------------------------------------- CopyBookmark ........................................ Syntax: CopyBookmark Bookmark1$, Bookmark2$ Sets Bookmark2$ equal to Bookmark1$. ---------------------------------------- ---------------------------------------- CopyFormat ........................................ Syntax: CopyFormat Copies the formatting of the selected text. ---------------------------------------- ---------------------------------------- CopyText ........................................ Syntax: CopyText Copies text. Equivalent to the copy to key (Shift+F2). Does not place copy on Clipboard. ---------------------------------------- ---------------------------------------- CountBookmarks() ........................................ Syntax: Num = CountBookmarks() Returns the number of bookmarks you have defined in the document. ---------------------------------------- ---------------------------------------- CountFiles() ........................................ Syntax: Num = CountFiles() Returns the number of names in the file list on the File menu. ---------------------------------------- ---------------------------------------- CountFont() ........................................ Syntax: Num = CountFonts() Returns the number of fonts available with the printer you've selected. ---------------------------------------- ---------------------------------------- CountGlossaries() ........................................ Syntax: Num = CountGlossaries ([Context]) Returns the number of glossaries defined in the given context. Context: 0 global (default) 1 document template ---------------------------------------- ---------------------------------------- CountMacros() ........................................ Syntax: Num = CountMacros([Context], [All]) Returns the number of programs def- ined in the given context. Context can be 0 (zero) for global or 1 for doc- ument template. The default is global. If All is nonzero, built-in macros are included. ---------------------------------------- ---------------------------------------- CountStyles() ........................................ Syntax: Num = CountStyles([Context], [All]) Returns the number of styles defined in the given context.If All is nonzero built-in styles are included. Context: 0 document (default) 1 document template. ---------------------------------------- ---------------------------------------- CountWindows() ........................................ Syntax: Num = CountWindows() Returns the number of windows in the list on the Window menu. ---------------------------------------- ---------------------------------------- Date$() ........................................ Syntax: A$ = Date$() Returns today's date. ---------------------------------------- ---------------------------------------- DDEExecute ........................................ Syntax: DDEExecute ChanNum, ExecuteString$ Sends an execute message over the channel ChanNum with an ExecuteString$, which is defined by the receiving application. Use the format described under SendKeys to send specific key sequences.Must use DDEInitiate() to open channel number. ---------------------------------------- ---------------------------------------- DDEInitiate() ........................................ Syntax: ChanNum = DDEInitiate(App$, Topic$) Opens a DDE channel to an applicat- ion. App$ is the application name defined by the other application. Topic$ describes something in the application you are accessing, usually the document containing the data you wish to use. If DDEInitiate() is suc- cessful, it returns number of open chan ---------------------------------------- ---------------------------------------- DDEPoke ........................................ Syntax: DDEPoke ChanNum, Item$, Data$ Sends the data to the item specified by Item$ in the application connected to channel ChanNum. ChanNum must have been opened by the DDEInitiate() func- tion. If DDEPoke is unsuccessful, an error is generated. ---------------------------------------- ---------------------------------------- DDERequest$() ........................................ Syntax: A$=DDERequest$ (ChanNum, Item$) Requests the information specified by Item$ over the DDE channel specified by ChanNum. ChanNum must have been opened by the DDEInitiate() function. If DDERequest$() is unsuccessful, a null string ("") is returned.DDERequest$() returns the data in CF_TEXT format. Pictures/RTF text cannot be transferred. ---------------------------------------- ---------------------------------------- DDETerminate ........................................ Syntax: DDETerminate ChanNum Closes the channel ChanNum. The channel must have been opened with the DDEInitiate() function. ---------------------------------------- ---------------------------------------- DDETerminateAll ........................................ Syntax: DDETerminateAll Similar to DDETerminate, but closes all open channels. ---------------------------------------- ---------------------------------------- Declare ........................................ Syn: DECLARE Sub SubName Lib LibName [ParameterList][Alias ModuleName] Syn: DECLARE Function FunctionName Lib LibName[ParameterList][AliasModuleName] Declares an external library function as a subroutine or function inside a macro. ---------------------------------------- ---------------------------------------- DeleteBackWord ........................................ Syntax: DeleteBackWord Deletes the word immediately pre- ceding the selection but does not place it on the Clipboard. ---------------------------------------- ---------------------------------------- DeleteWord ........................................ Syntax: DeleteWord Deletes the word immediately fol- lowing the selection but does not place it on the Clipboard. ---------------------------------------- ---------------------------------------- Dim ........................................ Syntax: Dim [Shared] Var [(Size)] [,Var [(Size)]...] Declares a variable's type and alloc- ates storage space for the variable. The Dim statement declares a variable's type and allocates storage space for the variable. If Shared is used, then the variable is global; if not, the variable is local to the Sub or Function. ---------------------------------------- ---------------------------------------- Dim (more) ........................................ If the variable is global, the Dim statement must be located outside the Sub or Function. If the variable is local, the Dim statement must be located inside the Sub or Function. Dim can also be used to declare global scalar (nonarray) variables. Arrays allow you to assign multiple values to a single variable. ---------------------------------------- ---------------------------------------- DisableInput ........................................ Syntax: DisableInput [Disable] Prevents the Esc key from inter- rupting a macro. The Esc key is enab- led by setting Disable to 0 (zero). DisableInput 0 Disable inactive DisableInput 1 Disable active(deflt) ---------------------------------------- ---------------------------------------- DocClose ........................................ Syntax: DocClose [Save] Closes the current window or pane. If Save is 1, Word saves the document if it has been edited (i.e., "dirty") since the last save; if Save is 2, Word does not save the document, but closes the window or pane. If Save is 0 or omitted, Word prompts user to save document if it has been edited. ---------------------------------------- ---------------------------------------- DocMaximize ........................................ Syntax: DocMaximize Zooms the document window to application window size. If it is already maximized, the screen is displayed in the restored state. ---------------------------------------- ---------------------------------------- DocMaximize() ........................................ Syntax: Log = DocMaximize() Returns -1 if the window is maximized. ---------------------------------------- ---------------------------------------- DocMove ........................................ Syntax: DocMove XPos, YPos Moves the document window to XPos, YPos relative to the top-left corner of the document area. Values are in points. ---------------------------------------- ---------------------------------------- DocRestore ........................................ Syntax: DocRestore Restores the Word window from a maximized state. ---------------------------------------- ---------------------------------------- DocSize ........................................ Syntax: DocSize Width, Height Sizes the document window to Width, Height. Values are in points. ---------------------------------------- ---------------------------------------- DocSplit ........................................ Syntax: DocSplit Percentage Splits the current window at the given percentage height. ---------------------------------------- ---------------------------------------- DocSplit() ........................................ Syntax: Num = DocSplit() Returns the current window split position as a percentage of the window height, or 0 (zero) if the window isn't split. ---------------------------------------- ---------------------------------------- DoFieldClick ........................................ Syntax: DoFieldClick Simulates a mouse button double-click within the GOTOBUTTON and MACROBUTTON fields' prompt. See the full Technical Reference for information on these fields. ---------------------------------------- ---------------------------------------- DoubleUnderline ........................................ Syntax: DoubleUnderline [On] Without the argument, toggles double underlining for the entire selection. If On is 1, Word makes the entire selection double underlined. If On is 0 (zero), Word removes double under- lining from the entire selection. ---------------------------------------- ---------------------------------------- DoubleUnderline() ........................................ Syntax: Num = DoubleUnderline() Returns 0 (zero) if none of the selection is double underlined, 1 if all of the selection is double underlined, or -1 if part of the selection is double underlined or more than one kind of underlining is used. ---------------------------------------- ---------------------------------------- EditClear ........................................ Syntax: EditClear [Count] Deletes the selection without changing the contents of the Clipboard. If the selection is an insertion point, del- etes the character to the right of the insertion point. If Count is supplied, deletes the specified # of characters from the right of the insertion point. If Count is a negative #, deletes to the left of the insertion point. ---------------------------------------- ---------------------------------------- EditCopy ........................................ Syntax: EditCopy Equivalent to the Copy command on the Edit menu. Copies the selection to the Clipboard. ---------------------------------------- ---------------------------------------- EditCut ........................................ Syntax: EditCut Equivalent to the Cut command on the Edit menu. The selection is placed on the Clipboard and then deleted. ---------------------------------------- ---------------------------------------- EditGlossary ........................................ Syntax: EditGlossary Name$, [Context] Equivalent to the Edit Glossary dialog box. Used to define, delete, and insert glossary entries. Context can be 0 (zero) for global or 1 for document template. The default is global.The default action is Insert. Append command button name from dlg box (Define or Delete) to change action ---------------------------------------- ---------------------------------------- EditGoTo ........................................ Syntax: EditGoTo Destination$ Equivalent to the Edit Go To dialog box. Destination$ is a bookmark name, a page number or goto string. See the special bookmarks in the preceding section and Moving the Insertion Point in the User's Reference for more information on bookmarks. ---------------------------------------- ---------------------------------------- EditHeaderFooter ........................................ Syntax: EditHeaderFooter [Type], [StartingNum[$]], [NumFormat], [HeaderDistance[$]],FooterDistance[$]], [FirstPage], [OddAndEvenPages] Equivalent to the Edit Header/Footer dialog box. Opens the header or footer pane for editing. If the argument is 1, the check box is on.If the argument is 0 (zero), the check box is off. ---------------------------------------- ---------------------------------------- EditHeaderFooterLink ........................................ Syntax: EditHeaderFooterLink Links the header/footer with a prev- ious section. This is not possible in the first section of a document. ---------------------------------------- ---------------------------------------- EditPaste ........................................ Syntax: EditPaste Equivalent to the Paste command on the Edit menu. Copies the contents of the Clipboard to the insertion point. ---------------------------------------- ---------------------------------------- EditPasteLink ........................................ Syntax: EditPasteLink [AutoUpdate] Equivalent to the Edit Paste Link dialog box. Pastes a DDE (Dynamic Data Exchange) field. If AutoUpdate is 1, EditPasteLink pastes a DDEAUTO field. ---------------------------------------- ---------------------------------------- EditReplace ........................................ Syntax: EditReplace [Search$], [Replace$],[WholeWord], [MatchCase],[Confirm],[Format] Equivalent to the Edit Replace dialog box. Replaces the Search$ string with Replace$. If Search$ and Replace$ are not supplied, the strings used in the previous search and/or replace are used. ---------------------------------------- ---------------------------------------- EditReplace (more) ........................................ To replace formatting in addition to, or instead of, text, use EditReplaceChar, EditReplacePara, EditSearchChar, or EditSearchPara first to set up the formatting, then run EditReplace or EditSearch with Format set to 1. ---------------------------------------- ---------------------------------------- EditReplaceChar ........................................ Syntax: EditReplaceChar[Font$], [Points[$]],[Color],[Bold],[Italic], [SmallCaps],[Hidden],[Underline], [WordUnderline],[DoubleUnderline], [Position[$]],[Spacing[$]] Dialog box equivalent; defines the character formatting EditReplace uses to format replacement text. See "Format- Character". ---------------------------------------- ---------------------------------------- EditReplacePara ........................................ Syntax: EditReplacePara [Alignment], [LeftIndent[$]],[RightIndent[$]], [FirstIndent[$]],[Before[$]], [After[$]],[LineSpacing[$]], [Style$],[KeepTogether], [KeepWithNext],[Border], [Pattern],[PageBreak],[NoLineNum] Dialog box equivalent; defines para- graph formatting EditReplace uses to format replacement text. ---------------------------------------- ---------------------------------------- EditSearch ........................................ Syntax: EditSearch[Search$],[WholeWord], [MatchCase],[Direction],[Format] Equivalent to the Edit Search dialog box.Searches for the specified Search$. The arguments correspond to a check box. If the argument is 1, the check box is on. If the argument is 0 (zero), the check box is off. ---------------------------------------- ---------------------------------------- EditSearchChar ........................................ Syntax: EditSearchChar [Font$], [Points[$]], [Color], [Bold], [Italic],[SmallCaps],[Hidden], [Underline], [WordUnderline], [DoubleUnderline], [Position[$]], [Spacing[$]] Dialog box equivalent;defines the char- acter formatting EditSearch and Edit- Replace use to find formatted text. See "FormatCharacters". ---------------------------------------- ---------------------------------------- EditSearchFound() ........................................ Syntax: Log = EditSearchFound() Returns -1 if the last EditSearch was successful. Returns 0 (zero) if not. ---------------------------------------- ---------------------------------------- EditSearchFound() (Example) ........................................ Sub MAIN Count = 0 StartOfDocument EditSearch "macro" While EditSearchFound() Count = Count + 1 EditSearch "macro" Wend Print "macro was found ";Count;" times" End Sub ---------------------------------------- ---------------------------------------- EditSearchPara ........................................ Syntax: EditSearchPara[Alignment], [LeftIndent[$]],[RightIndent[$]], [FirstIndent[$]],[Before[$]], [After[$]],[LineSpacing[$]], [Style$],[KeepTogether], [KeepWithNext],[Border],[Pattern], [PageBreak],[NoLineNum] Dialog box equivalent; defines the para graph formatting EditSearch and EditRep- lace use to find formatted text. ---------------------------------------- ---------------------------------------- EditSelectAll ........................................ Syntax: EditSelectAll Selects the entire document. ---------------------------------------- ---------------------------------------- EditSummaryInfo ........................................ Syntax: EditSummaryInfo[Title$], [Subject$],[Author$],[Keywords$], [Comments$],[Directory$],[Template$], [CreateDate$],[LastSavedDate$], [LastSavedBy$],[RevisionNumber], [EditTime$],[LastPrintedDate$], [NumPages],[NumWords], [NumChars],[FileName$] Equivalent to the Edit Summary Info dialog box.All options in Stat dlg box are read-only except for EditTime. ---------------------------------------- ---------------------------------------- EditTable ........................................ Syntax: EditTable[Modify],[ShiftCells] Equivalent to the Edit Table dialog box. Modify is 0 (zero) for Row, 1 for Column, or 2 for Selection. ShiftCells is 0 for Horizontally or 1 for Vertic- ally. Can append Delete,MergeCells, or SplitCells command button name. ---------------------------------------- ---------------------------------------- EditUndo ........................................ Syntax: EditUndo Equivalent to the Undo command on the Edit menu. Undoes the last action, if possible.You can undo certain Word actions, such as Cut and Paste.Some actions can't be undone. ---------------------------------------- ---------------------------------------- EmptyBookmark() ........................................ Syntax: Log = EmptyBookmark(Name$) Returns -1 if Name$ is empty (an insertion point), or 0 (zero) if Name$ is not empty. ---------------------------------------- ---------------------------------------- EndOfColumn ........................................ Syntax: EndOfColumn [Select] Moves the insertion point to the bottom cell in the table column. If Select is a nonzero value, the selection is extended. ---------------------------------------- ---------------------------------------- EndOfDocument ........................................ Syntax: EndOfDocument [Select] Moves the selection to the end of the document. If Select is a nonzero value the selection is extended. ---------------------------------------- ---------------------------------------- EndOfLine ........................................ Syntax: EndOfLine [Select] Moves the selection to the end of the line.If Select is a nonzero value, the selection is extended. ---------------------------------------- ---------------------------------------- EndOfRow ........................................ Syntax: EndOfRow [Select] Moves the selection to the end of the last cell in the table row. If Select is a nonzero value, the selection is extended. ---------------------------------------- ---------------------------------------- EndOfWindow ........................................ Syntax: EndOfWindow [Select] Moves the selection to the end of the window. If Select is a nonzero value, the selection is extended. ---------------------------------------- ---------------------------------------- Eof() ........................................ Syntax: Log = Eof(StreamNumber) Returns -1 when the end of the file attached to the stream number has been reached. ---------------------------------------- ---------------------------------------- Err ........................................ Syntax: Err This is a special variable that contains the error code for the most recent error condition. ---------------------------------------- ---------------------------------------- Error ........................................ Syntax: Error ErrorNumber Displays a message corresponding to an error situation. ErrorNumber is an error code. ---------------------------------------- ---------------------------------------- ExistingBookmark() ........................................ Syntax: ExistingBookmark(Bookmark$) Returns -1 if Bookmark$ exists, or 0 (zero) if not. ---------------------------------------- ---------------------------------------- ExpandGlossary ........................................ Syntax: ExpandGlossary Expands the word closest to the insertion point into the corresponding glossary text. ---------------------------------------- ---------------------------------------- ExtendSelection ........................................ Syntax: ExtendSelection [Character$] Turns on extend mode, if it is not already turned on. If extend mode is already turned on, selection is extended to next unit (char->word-> sentence->paragraph). If Character$ is specified, the selection is extended to that character. ---------------------------------------- ---------------------------------------- File1 ........................................ Syntax: File1 Equivalent to selecting the first listed file on the File menu. Opens the first file. An error is generated if you attempt to open a nonexistent file slot. For example, you cannot use File4 if only three files are listed under the File menu. ---------------------------------------- ---------------------------------------- File2 ........................................ Syntax: File2 Equivalent to selecting the second listed file on the File menu. Opens the second file. An error is generated if you attempt to open a nonexistent file slot. For example, you cannot use File4 if only three files are listed under the File menu. ---------------------------------------- ---------------------------------------- File3 ........................................ Syntax: File3 Equivalent to selecting the third listed file on the File menu. Opens the third file. An error is generated if you attempt to open a nonexistent file slot. For example, you cannot use File4 if only three files are listed under the File menu. ---------------------------------------- ---------------------------------------- File4 ........................................ Syntax: File4 Equivalent to selecting the fourth listed file on the File menu. Opens the fourth file. An error is generated if you attempt to open a nonexistent file slot. For example, you cannot use File4 if only three files are listed under the File menu. ---------------------------------------- ---------------------------------------- FileClose ........................................ Syntax: FileClose [Save] Equivalent to the Close command on the File menu. Closes the current file and associated windows. The Save argument determines whether a save is forced: 1 forces a save, 2 forces no save, 0 prompts the user to save edited documents. ---------------------------------------- ---------------------------------------- FileExit ........................................ Syntax: FileExit [Save] Equivalent to the Exit command on the File menu. Quits Word. If any open documents have been edited and Save is omitted or is 0 (zero), you are prompted to save each changed document. If Save is 1, all edited documents are automatically saved before exiting.If Save is 2, the documents are not saved. ---------------------------------------- ---------------------------------------- FileFind ........................................ Syntax: FileFind[SortBy],[SearchList$], [Title$],[Subject$],[Author$], [Keywords$],[SavedBy$],[Text$], [DateCreatedFrom$],[DateCreatedTo$], [DateSavedFrom$],[DateSavedTo$], [MatchCase],[SearchAgain] Equivalent to the File Find dialog box. It can be used to change the search criteria in subsequent FileFind statements. ---------------------------------------- ---------------------------------------- FileName$() ........................................ Syntax: A$ = FileName$(n) Returns the nth file in the file list. If n is 0 (zero), the name of the current file is returned. If n is greater than the number of files in the file cache, an error is generated. If there is no current document, FileName$(0) returns an empty string. ---------------------------------------- ---------------------------------------- FileNew ........................................ Syntax: FileNew[NewTemplate], [Template$] Equivalent to the File New dialog box. ---------------------------------------- ---------------------------------------- FileOpen ........................................ Syntax: FileOpen Name$, [ReadOnly] Equivalent to the File Open dialog box. Opens the named document. An error is generated if the document does not exist. If ReadOnly is 1, the document is opened as read-only. ---------------------------------------- ---------------------------------------- FilePrint ........................................ Syntax: FilePrint [Type],[NumCopies], [Range],[From$],[To$],[Reverse], [Draft],[UpdateFields],[PaperFeed], [Summary],[Annotations],[ShowHidden], [ShowCodes],[FileName$] Equivalent to the File Print dialog box. ---------------------------------------- ---------------------------------------- FilePrinterSetup ........................................ Syntax: FilePrinterSetup [Printer$] Equivalent to the File Printer Setup dialog box. Printer$ is the name of the new printer to be activated. Enter this argument exactly as it appears in the File Printer Setup dialog box. The Setup command button name can be append- ed to display the dlg box showing the printer options. ---------------------------------------- ---------------------------------------- FilePrintMerge ........................................ Syntax: FilePrintMerge [From], [To] Equivalent to the File Print Merge dialog box. If From or To is nonzero, Word merges the specified records only. The New Document command button name can be appended to direct the output to a new document. ---------------------------------------- ---------------------------------------- FilePrintPreview ........................................ Syntax: FilePrintPreview [On] Equivalent to the Print Preview command on the File menu. Without On, toggles print preview mode. If On is nonzero, turns on print preview mode; if On is 0 (zero), turns off print preview mode. ---------------------------------------- ---------------------------------------- FilePrintPreviewBoundaries ........................................ Syntax: FilePrintPreviewBoundaries[On] Displays the text boundaries if On is nonzero; turns off display if On is 0 (zero). If On is omitted, toggles the display of text boundaries. ---------------------------------------- ---------------------------------------- FilePrintPreviewPages ........................................ Syntax: FilePrintPreviewPages [Pages] Without the argument, toggles display between one and two pages. Pages: 0 Toggles the display state (default) 1 One page 2 Two pages ---------------------------------------- ---------------------------------------- Files$() ........................................ Syntax: A$ = Files$(FileSpec$) Returns the first filename matching FileSpec$. If FileSpec$ is not suppl- ied, the next file matching the last used FileSpec$ is returned. This func- tion can be used to get a list of files matching a FileSpec$ by specify- ing the FileSpec$ on the first time and omitting it thereafter. File$(".") returns current dir. (No match => "") ---------------------------------------- ---------------------------------------- FileSave ........................................ Syntax: FileSave Equivalent to the Save command on the File menu. Saves the current document. ---------------------------------------- ---------------------------------------- FileSaveAll ........................................ Syntax: FileSaveAll [Save] Equivalent to the Save All command on the File menu. Prompts the user to save all changed files including NORMAL.DOT. If Save is 1, all edited documents are automatically saved. If Save is 2, the documents are not saved. If Save is 0 or omitted, Word prompts the user to save all changed files. ---------------------------------------- ---------------------------------------- FileSaveAs ........................................ Syntax: FileSaveAs [Name$],[Format], [FastSave],[CreateBackup],[LockAnnot] Equivalent to the File Save As dialog box. Saves the current document with a new name and/or format.Name$ specifies the new name. Format specifies the new format: 0 Normal 4 Text(PC) 1 DOT 5 T+B(PC) 2 Text 6 RTF 3 Text+Breaks (list others in WIN.INI) ---------------------------------------- ---------------------------------------- Font ........................................ Syntax: Font Name$, [Size] Applies the named font to the selection. You can include the Size argument instead of following this statement with the FontSize statement. ---------------------------------------- ---------------------------------------- Font$() ........................................ Syntax: A$ = Font$() or Font$(Count) Returns the font name of the current selection. If the selection has more than one font, a null string is returned. If Count is supplied, Font$() returns the name of the font Count. Count must be in the range 1 to CountFonts(). ---------------------------------------- ---------------------------------------- FontSize ........................................ Syntax: FontSize Size Sets the size of the current selection in points. ---------------------------------------- ---------------------------------------- FontSize() ........................................ Syntax: Num = FontSize() Returns the font size of the current selection. If the selection has more than one font size, 0 (zero) is returned. ---------------------------------------- ---------------------------------------- For...Next ........................................ Syntax: For CounterVariable = Start To End [Step Increment] Statement(s) Next [CounterVariable] Executes the statements between For and Next as many times as it takes the CounterVariable to go from the Start value to the End value. The Increment is the value to increment the counter (usually 1). ---------------------------------------- ---------------------------------------- FormatCharacter ........................................ Syntax: FormatCharacter[Font$], [Points[$]],[Color],[Bold], [Italic],[SmallCaps],[Hidden], [Underline],[WordUnderline], [DoubleUnderline],[Position[$]], [Spacing[$]] Equivalent to the Format Character dialog box.Applies character format- ting to the selection.Some arguments take measurements in points; others arg- uments correspond to a check box. ---------------------------------------- ---------------------------------------- FormatDefineStyles ........................................ Syntax: FormatDefineStyles Name$, [BasedOn$],[NextStyle$], [AddToTemplate],[NewName$], [FileName$],[Source] Equivalent to the Format Define Styles dialog box. Defines a new style with the specified Name$. If a style with that name already exists, that style is made the current style.To redefine an existing style, include the specific arguments with FormatDefineStyles st'mnt ---------------------------------------- ---------------------------------------- FormatDefineStyles (more) ........................................ The BasedOn$ argument specifies a style on which to base the new style. The NextStyle$ argument specifies the style to be applied after the new style. AddToTemplate can be 0 for the document only, or 1 for the document and its template. The Delete, Rename, and Merge command button names can be appended. The NewName$ argument speci- fies a new name for the style;it is used only with the Rename command button. ---------------------------------------- ---------------------------------------- FormatDefineStyles (still more) ........................................ The FileName$ argument is used only with the Merge command button. It specifies the template or document whose style sheet is to be merged with that of the current document or template.Source is used only in conjunction with the Merge command button name, and can be 0 (from the current DOC/DOT to a specified one) or 1 (from the specified to the current one). ---------------------------------------- ---------------------------------------- FormatDefineStylesChar ........................................ Dialog box equivalent; defines the current style with the specified character properties. This statement takes the same arguments as its corresponding format function. See "FormatCharacter". ---------------------------------------- ---------------------------------------- FormatDefineStylesPara ........................................ Dialog box equivalent; defines the current style with the specified paragraph properties. This statement takes the same arguments as its corresponding format function. See "FormatParagraph". ---------------------------------------- ---------------------------------------- FormatDefineStylesPosition ........................................ Dialog box equivalent; defines the current style with the specified position properties. This statement takes the same arguments as its corresponding format function. See "FormatPosition". ---------------------------------------- ---------------------------------------- FormatDefineStylesTabs ........................................ Dialog box equivalent; defines the current style with the specified tab properties. This statement takes the same arguments as its corresponding format function. See "FormatTabs". ---------------------------------------- ---------------------------------------- FormatDocument ........................................ Syntax: FormatDocument[PageWidth[$]], [PageHeight[$]],[DefTabs[$]], [TopMargin[$]],[BottomMargin[$]], [LeftMargin[$]],[RightMargin[$]], [Gutter[$]],[MirrorMargins], [FootnotesAt],[StartingNum[$]], [RestartNum],[Template$], [WidowControl] Equivalent to the Format Document dlg box.Applies document Formatting properties. ---------------------------------------- ---------------------------------------- FormatDocument (more) ........................................ Some arguments take measurements in points. Other arguments correspond to a check box. To set the global or template default,append the SetDefault command button name to this statement. This is a powerful argument that changes the default document properties to those specified in the statement. ---------------------------------------- ---------------------------------------- FormatParagraph ........................................ Syntax: FormatParagraph [Alignment], [LeftIndent[$]],[RightIndent[$]], [FirstIndent[$]],[Before[$]], [After[$]],[LineSpacing[$]], [Style$],[KeepTogether], [KeepWithNext],[Border],[Pattern], [PageBreak],[NoLineNum] Equivalent to the Format Paragraph dialog box. Applies paragraph formatting. ---------------------------------------- ---------------------------------------- FormatParagraph (more) ........................................ The LeftIndent[$], RightIndent[$] and FirstIndent[$] arguments specify the amount of left, right, and first-line indents, respectively. The Before[$] and After[$] arguments specify the amount of spacing above and below a paragraph,respectively. The Line- Spacing[$] argument specifies the amount of spacing for all lines in a paragraph.The Style$ arg. specifies a style to be applied to a paragraph. ---------------------------------------- ---------------------------------------- FormatParagraph (still more) ........................................ The KeepTogether and KeepWithNext arguments prevent page breaks within a paragraph and between paragraphs, respectively. The PageBreak argument inserts a page break before printing the paragraph. The NoLineNum argument turns off line numbering for the para- graph. ---------------------------------------- ---------------------------------------- FormatPicture ........................................ Syntax: FormatPicture [Border],[ScaleY], [ScaleX],[CropTop[$]],[CropLeft[$]], [CropBottom[$]],[CropRight[$]] Equivalent to the Format Picture dialog box. Applies picture formatting properties. Some arguments take measurements in points.Other arguments correspond to check boxes. ---------------------------------------- ---------------------------------------- FormatPosition ........................................ Syntax: FormatPosition [Horizontal[$]], [HRelativeTo],[Vertical[$]], [VRelativeTo],[DistanceFromText], [ParagraphWidth[$]] Equivalent to the Format Position dlg box. Applies position formatting to the selected paragraphs. The Reset command button name can be appended to cancel the position formatiing of the paragraph. ---------------------------------------- ---------------------------------------- FormatSection ........................................ Syntax: FormatSection [Columns], [ColumnSpacing[$]],[ColLine], [SectionStart],[Footnotes], [LineNum],[StartingNum[$]], [FromText[$]],[CountBy], [NumMode],[VertAlign] Equivalent to the Format Section dlg box.Applies section format properties to the selection. Some arguments take measurements in points or numbers. Other arguments coorespond to check boxes. ---------------------------------------- ---------------------------------------- FormatStyles ........................................ Syntax: FormatStyles Name$, [Create] Equivalent to the Format Styles dlg box. Applies the style in Name$ to the selected paragraphs.If the style does not exist and Create is not specified or is 0 (zero), an error is generated. If Create is specified as 1, the style is created with the properties of the selection, if it doesn't already exist. ---------------------------------------- ---------------------------------------- FormatTable ........................................ Syntax:FormatTable[FromColumn],[Column], [ColumnWidth],[SpaceBetweenCols[$]], [IndentRows[$]],[MinimumRowHeight], [OutlineBorder],[TopBorder], [BottomBorder],[InsideBorder], [LeftBorder],[RightBorder], [AlignRows],[ApplyTo] Equivalent to the Format Table dialog box. When recording, pressing the Next or Prev Columns command button records a new FormatTable command. ---------------------------------------- ---------------------------------------- FormatTabs ........................................ Syntax: FormatTabs [Position],[Align], [Leader] Equivalent to the Format Tabs dialog box. Position is a measurement in points.Set is the default action.Append Clear/ClearAll button name to Clear[All] Align argument: Leader argument: 0 Left 0 none 1 Centered 1 Dot 2 Right 2 Dash 3 Decimal 3 Underline ---------------------------------------- ---------------------------------------- Function...End Function ........................................ Syntax: Function Name [ParameterList] Statement(s) End Function Defines a function. The ParameterList is a list of variables, separated by commas, for receiving arguments to the function. See WTR for more information on user-defined functions. ---------------------------------------- ---------------------------------------- GetBookmark$() ........................................ Syntax: A$= GetBookmark$(BookmarkName$) Returns the text at the specified bookmark. ---------------------------------------- ---------------------------------------- GetCurValues ........................................ Syntax: GetCurValues DialogRecord Stores in DialogRecord the current values for a previously dimensioned dialog box. ---------------------------------------- ---------------------------------------- GetGlossary$() ........................................ Syntax:A$=GetGlossary$(Name$,[Context]) Returns the text of the glossary entry in Name$. The Context is 0 (zero) for global (default) or 1 for document template. ---------------------------------------- ---------------------------------------- GetProfileString$() ........................................ Syntax:A$=GetProfileString$([App$],Key$) Gets a value from the current WIN.INI file. App$ is the name of the Microsoft Windows application. If the application is not specified, the string [Microsoft Word] is used. If the Key$ is not found, the function returns a null string. ---------------------------------------- ---------------------------------------- GlossaryName$() ........................................ Syntax:A$=GlossaryName$(Count,[Context]) Returns the name of the glossary defined in the given context (global or document template). Count must be in the range from 1 to CountGlossaries (Context). The name is taken from the list in the given context. Context is 0 (zero) for global, 1 for document template. ---------------------------------------- ---------------------------------------- GoBack ........................................ Syntax: GoBack Toggles among the last three selections where text or formatting has changed. ---------------------------------------- ---------------------------------------- Goto ........................................ Syntax: Goto Label/LineNumber Branches unconditionally to a label or line number. ---------------------------------------- ---------------------------------------- GroupBox ........................................ Syntax: GroupBox x, y, dx, dy, Text$ Creates a box with a title. A Group- Box does not have a result. ---------------------------------------- ---------------------------------------- GrowFont ........................................ Syntax: GrowFont Increases the size of the selected font. Can be used either on the selection, or at the insertion point. ---------------------------------------- ---------------------------------------- HangingIndent ........................................ Syntax: HangingIndent Sets the indent of the selection to the next tab stop in the first paragraph. Sets the first line of the paragraph flush with the left margin. ---------------------------------------- ---------------------------------------- Help ........................................ Syntax: Help Activates Help. Equivalent to pressing F1. ---------------------------------------- ---------------------------------------- HelpAbout ........................................ Syntax: HelpAbout Displays a dialog box with the Word version number and copyright information. ---------------------------------------- ---------------------------------------- HelpActiveWindow ........................................ Syntax: HelpActiveWindow Activates Help for the active window. ---------------------------------------- ---------------------------------------- HelpContext ........................................ Syntax: HelpContext Activates context-sensitive Help. Equivalent to pressing Shift+F1. ---------------------------------------- ---------------------------------------- HelpIndex ........................................ Syntax: HelpIndex Displays the list of Help topics. ---------------------------------------- ---------------------------------------- HelpKeyboard ........................................ Syntax: HelpKeyboard Displays list of keyboard Help topics. ---------------------------------------- ---------------------------------------- HelpTutorial ........................................ Syntax: HelpTutorial Starts the Tutorial. ---------------------------------------- ---------------------------------------- HelpUsingHelp ........................................ Syntax: HelpUsingHelp Displays Help topics on how to use Help. ---------------------------------------- ---------------------------------------- Hidden ........................................ Syntax: Hidden [On] Without an argument, toggles hidden text for the entire selection. If On is nonzero, makes the entire selection hidden text if the first character is hidden. If On is 0 (zero), removes hidden text from the entire selection. ---------------------------------------- ---------------------------------------- Hidden() ........................................ Syntax: Num = Hidden() Returns 0 (zero) if none of the selection is hidden text, 1 if all of the selection is hidden text, or -1 if part of the selection is hidden text. ---------------------------------------- ---------------------------------------- HLine ........................................ Syntax: HLine [Count] Scrolls horizontally to the right by Count lines. If Count is not Speci- fied, one line is the default. "Lines" mean the amount the screen is scrolled by clicking the mouse in a horizontal scroll bar arrow. A negative Count scrolls to the left. ---------------------------------------- ---------------------------------------- HPage ........................................ Syntax: HPage [Count] Scrolls horizontally by Count screens. If Count is not specified, one screen is the default. A negative Count scrolls to the left. ---------------------------------------- ---------------------------------------- HScroll ........................................ Syntax: HScroll Percentage Scrolls horizontally the specified percentage of the document width. ---------------------------------------- ---------------------------------------- HScroll() ........................................ Syntax: Num = HScroll() Returns the current horizontal scroll position as a percentage of the document width. ---------------------------------------- ---------------------------------------- IconBarMode ........................................ Syntax: IconBarMode Activates icon bar mode. ---------------------------------------- ---------------------------------------- If...ElseIf...Else...End If ........................................ Syntax: If Condition Then Statement(s) [Else Statement(s)] Syntax: If Condition1 Then Statement(s) [ElseIf Condition2 Then Statement(s)] [Else Statement(s)] End If The conditions can be any numeric exp- ression in WordBASIC. ---------------------------------------- ---------------------------------------- Indent ........................................ Syntax: Indent Indents the selection. The indent is aligned with the next tab stop. Indent does not change a first-line indent. ---------------------------------------- ---------------------------------------- Input ........................................ Syntax: Input[#]StreamNumber,Variable, [Variable] Reads a line from the file specified by #StreamNumber into the variables listed. The line read from the file is separated into individual values by commas. If a StreamNumber is not specified, you are prompted in the status bar. ---------------------------------------- ---------------------------------------- Input$() ........................................ Syntax: A$ = Input$(n, StreamNumber) Reads n characters from the file specified by StreamNumber. ---------------------------------------- ---------------------------------------- InputBox$() ........................................ Syntax: A$=InputBox$(Prompt$,[Title$], [Default$]) Displays an editable dialog box. Returns the text that was in the box when OK was chosen. If you specified a default, it is loaded into the dialog box when it is displayed. ---------------------------------------- ---------------------------------------- Insert ........................................ Syntax: Insert Text$ Inserts the given text at the insert- ion point.Nonprinting characters are inserted as Chr$(n) statements. Chr$(x)=> Character inserted: Chr$(9) Tab Chr$(11) Linefeed Chr$(30) Nonbreaking hyphen Chr$(31) Optional hyphen Chr$(34) Quotation marks Chr$(60) Nonbreaking space ---------------------------------------- ---------------------------------------- InsertBookmark ........................................ Syntax: InsertBookmark Name$ Equivalent to the Insert Bookmark dialog box. Creates or deletes the named bookmark. If the Delete command button is appended, the bookmark is deleted. If Delete is not specified, the bookmark is created at the current selection.If you specify a nonexistent bookmark for deletion, an error is gen- erated. ---------------------------------------- ---------------------------------------- InsertBreak ........................................ Syntax: InsertBreak Type Equivalent to the Insert Break dlg box. Inserts a page, section or column break at the current selection. Type argument: 0 Page 1 Column 2 Next (Section break) 3 Continuous (Section break) 4 Even (Section break) 5 Odd (Section break) ---------------------------------------- ---------------------------------------- InsertColumnBreak ........................................ Syntax: InsertColumnBreak Inserts a column break at the insertion point. If the insertion point is in a table, the break is inserted above the row in which the insertion point is located. ---------------------------------------- ---------------------------------------- InsertDateField ........................................ Syntax: InsertDateField Inserts a DATE field at the selection. ---------------------------------------- ---------------------------------------- InsertField ........................................ Syntax: InsertField Field$ Equivalent to the Insert Field dlg box. Inserts the specified field at the selection. Do not include the field characters {} in Field$. ---------------------------------------- ---------------------------------------- InsertFieldChars ........................................ Syntax: InsertFieldChars Inserts field characters {} at the selection. ---------------------------------------- ---------------------------------------- InsertFile ........................................ Syntax: InsertFile Name$,[Range$],[Link] Equivalent to the Insert File dialog box. Inserts the named file at the current selection. Range$ refers to a bookmark if Name$ refers to a Word document.If Name$ refers to another document type (for example, an Excel worksheet), then Range$ refers to a named range. If Link is 1, a link to the file is inserted instead of actual file. ---------------------------------------- ---------------------------------------- InsertFootnote ........................................ Syntax: InsertFootnote [Reference$] Equivalent to the Insert Footnote dialog box. Inserts a footnote at the current selection. Reference$ is footnote reference text that you supply.To insert a footnote separator, continued footnote separator or notice for continued footnotes, append the Separator,ContSeparator or ContNotice command button name. ---------------------------------------- ---------------------------------------- InsertIndex ........................................ Syntax: InsertIndex [Type], [HeadingSeparator],[Replace] Equivalent to the Insert Index dialog box. Inserts an INDEX field at the current selection. Type is 0 for a normal index (default) or 1 for a run-in index. HeadingSeparator is 0 for none (default), 1 for a blank line, or 2 for a letter.If Replace is 1, the existing index is overwritten. If omitted or 0 index is not overwritten. ---------------------------------------- ---------------------------------------- InsertIndexEntry ........................................ Syntax: InsertIndexEntry [Entry$], [Range$],[Bold],[Italic] Equivalent to the Insert Index Entry dialog box. Inserts an XE field at the current selection. If Entry$ is omitted, the selection is the entry. The arguments correspond to check boxes. ---------------------------------------- ---------------------------------------- InsertPageBreak ........................................ Syntax: InsertPageBreak Inserts a page break at the current selection. ---------------------------------------- ---------------------------------------- InsertPageField ........................................ Syntax: InsertPageField Inserts a PAGE field at the current selection. ---------------------------------------- ---------------------------------------- InsertPageNumbers ........................................ Syntax: InsertPageNumbers [Type], [Position] Dialog box equivalent; inserts a current PAGE field into the header or footer. Type: Position: 0 Header 0 Left-aligned 1 Footer 1 Centered 2 Right-aligned ---------------------------------------- ---------------------------------------- InsertPara ........................................ Syntax: InsertPara Inserts a paragraph mark at the current selection. ---------------------------------------- ---------------------------------------- InsertPicture ........................................ Syntax: InsertPicture [Name$] Equivalent to the Insert Picture dialog box. Inserts an IMPORT field at the current selection. If Name$ is not supplied, a 1-inch graphic frame with a single border is inserted. ---------------------------------------- ---------------------------------------- InsertTable ........................................ Syn: InsertTable [NumColumns],[NumRows], [InitialColWidth[$]],[ConvertFrom] Equivalent to the Insert Table dialog box. Choosing Format is record- ed as an InsertTable statement follow- ed by a FormatTable statement. ---------------------------------------- ---------------------------------------- InsertTableOfContents ........................................ Syntax: InsertTableOfContents [Source], [From],[To],[Replace] Equivalent to the Insert Table Of Contents dialog box. Inserts a TOC field at the current selection. Source is 0 (zero) for outline headings, or 1 for table entry fields. From and To refer to the outline levels used. If Replace is 1, the existing table of contents is overwritten. If omitted or 0, the table is not overwritten. ---------------------------------------- ---------------------------------------- InsertTableToText ........................................ Syntax: InsertTableToText [ConvertTo] Dialog box equivalent; converts the selected cells to normal text. ConvertTo may be 0 (zero) for paragraphs, 1 for tab-delimited text, or 2 for comma-delimited text. ---------------------------------------- ---------------------------------------- InsertTimeField ........................................ Syntax: InsertTimeField Inserts a TIME field at the current selection. ---------------------------------------- ---------------------------------------- Instr() ........................................ Syn: Num=Instr([Index],Source$,Search$) Hint: Instr() <=> "IN STRing" Searches for Search$ in Source$. Returns the number of the character where Search$ started, or 0 (zero) if Search$ is not found in Source$. If Index is supplied, the search starts at character Index. ---------------------------------------- ---------------------------------------- Int() ........................................ Syntax: Num = Int(n) Returns the integer part of n. ---------------------------------------- ---------------------------------------- IsDirty() ........................................ Syntax: Log = IsDirty() Returns -1 if the document has been changed (made dirty) since the last save, 0 (zero) if the document has not been changed. ---------------------------------------- ---------------------------------------- Italic ........................................ Syntax: Italic [On] Without the argument, toggles italic for the entire selection. If On is nonzero, makes the entire selection italic. If On is 0 (zero), removes italic from the entire selection. ---------------------------------------- ---------------------------------------- Italic() ........................................ Syntax: Num = Italic() Returns 0 (zero) if none of the selection is italic, 1 if all of the selection is italic, or -1 if part of the selection is italic. ---------------------------------------- ---------------------------------------- JustifyPara ........................................ Syntax: JustifyPara Justifies the selected paragraphs. ---------------------------------------- ---------------------------------------- JustifyPara() ........................................ Syntax: Num = JustifyPara() Returns 0 (zero) if none of the selected paragraphs are justified, 1 if all of the selected paragraphs are justified, or -1 if more than one kind of paragraph alignment is used. ---------------------------------------- ---------------------------------------- Kill ........................................ Syntax: Kill Name$ Deletes the file specified by Name$. ---------------------------------------- ---------------------------------------- LCase$() ........................................ Syntax: A$ = LCase$(Source$) Returns Source$ converted to lowercase. ---------------------------------------- ---------------------------------------- Left$() ........................................ Syntax: A$ = Left$(Source$, n) Returns the leftmost n characters of Source$. ---------------------------------------- ---------------------------------------- LeftPara ........................................ Syntax: LeftPara Left aligns the selected paragraphs. ---------------------------------------- ---------------------------------------- LeftPara() ........................................ Syntax: Num = LeftPara() Returns 0 (zero) if none of the selected paragraphs are left aligned, 1 if all of the selected paragraphs are left aligned, or -1 if more than one kind of paragraph alignment is used. ---------------------------------------- ---------------------------------------- Len() ........................................ Syntax: Num = Len(Source$) Returns the number of characters in Source$. ---------------------------------------- ---------------------------------------- Let ........................................ Syntax: [Let] Var = Expression Assigns the value of an expression to a variable. Let is optional. ---------------------------------------- ---------------------------------------- Line Input ........................................ Syntax:Line Input [#]StreamNumber, Variable$ Reads an entire line from the file specified by StreamNumber and puts the result in the specified string variable. If a StreamNumber is not specified,you are prompted in the status bar.Similar to the Input statement but LineInput doesn't break the line into separate values at commas. ---------------------------------------- ---------------------------------------- LineDown ........................................ Syntax: LineDown [Repeat], [Select] Moves the selection down by Repeat lines. If the Repeat argument is omitted, 1 is assumed. If Select is nonzero, the selection is extended down by Repeat lines. ---------------------------------------- ---------------------------------------- LineDown() ........................................ Syntax: Log=LineDown([Repeat],[Select]) Moves the selection down by Repeat lines. Returns 0 (zero) if the action cannot be completed. ---------------------------------------- ---------------------------------------- LineUp ........................................ Syntax: LineUp [Repeat], [Select] Moves the selection up by Repeat lines. If the Repeat argument is omitted, 1 is assumed. If Select is nonzero, the selection is extended up by Repeat lines. If Select is 0 (zero) or omitted, the selection is not extended. ---------------------------------------- ---------------------------------------- LineUp() ........................................ Syntax: Log = LineUp([Repeat],[Select]) Moves the selection up by Repeat lines. Returns 0 (zero) if the action cannot be completed. For example, the function would return 0 if the insertion point is at the beginning of the document. ---------------------------------------- ---------------------------------------- LockFields ........................................ Syntax: LockFields Prevents the fields within the select- ion from being updated. ---------------------------------------- ---------------------------------------- Lof() ........................................ Syntax: Num = Lof(StreamNumber) Returns the length of the file, in bytes. ---------------------------------------- ---------------------------------------- MacroAssignToKey ........................................ Syn: MacroAssignToKey [Name$],[KeyCode], [Context] Equiv to the Macro Assign to Key dlg box. You can assign a macro to any key or key combination.Assigns the macro Name$ to the specified KeyCode.KeyCode is a number representing the exact key The number is not equivalent to the SendKeys syntax.Context is 0 for global 1 for document template.Assign is def- ault action.Can append ResetAll/UnAssign ---------------------------------------- ---------------------------------------- MacroAssignToKey (Key Code Summary) ........................................ Backsp 8 PgUp 33 0-9 48-57 Tab 9 PgDn 34 A-Z 65-90 5(NP)* 12 End 35 0-9(NP) 96-105 Enter 13 Home 36 *+?-./ 106-111 Esc 27 Ins 45 F1-F16 112-127 Space 32 Del 46 * w/NumLock off Add following values for shifted keys: 256 (Ctrl) 512 (Shift) 1024 (Alt) ---------------------------------------- ---------------------------------------- MacroAssignToKey (Key Codes) ........................................ 48-0 66-B 77-M 88-X 103-7 114-F3 49-1 67-C 78-N 89-Y 104-8 115-F4 50-2 68-D 79-O 90-Z 105-9 116-F5 51-3 69-E 80-P #Pd: 106-* 117-F6 52-4 70-F 81-Q 96-0 107-+ 118-F7 53-5 71-G 82-R 97-1 108-?? 119-F8 54-6 72-H 83-S 98-2 109 - 120-F9 55-7 73-I 84-T 99-3 110-. 121-F10 56-8 74-J 85-U 100-4 111-/ 122-F11 57-9 75-K 86-V 101-5 112-F1 123-F12 65-A 76-L 87-W 102-6 113-F2 124-F13 ---------------------------------------- ---------------------------------------- MacroAssignToMenu ........................................ Syn: MacroAssignToMenu [Name$],[Menu$], [MenuText$], [Context] Equiv to the Macro Assign To Menu dlg box.Assigns the macro Name$ to the specified Menu$ with MenuText$. Menu$ can be File, Edit, View, Insert, For- Format, Utilities, Macro, or Window. Context is 0 for global, 1 for doc template. Assign is default action.Ap- pend ResetAll/UnAssign cbn to change action of macro. ---------------------------------------- ---------------------------------------- MacroEdit ........................................ Syntax: MacroEdit Name$, [Context], [Description$],[ShowAll],[NewName$] Equivalent to the Macro Edit dlg box. Displays the Name$ macro for editing. Context is 0 for global (def) or 1 for document template. The Description$ refers to text on status line. ShowAll lists all Word commands. If Rename,Delete or Set cbn is used and followed by another action, multi- ple MacroEdit commands are recorded. ---------------------------------------- ---------------------------------------- MacroName$() ........................................ Syn:A$=MacroName$(Count,[Context],[All]) Returns the name of the macro defined in the given context. Count may be in the rng of 1 to CountMacros(Context). The name is taken from the list in the given context.MacroName$(0) gives the name of the current macro window, if any.Context is 0 for global, 1 for document template. If All is True, built-in commands are included. ---------------------------------------- ---------------------------------------- MacroRecord ........................................ Syntax: MacroRecord [Name$],[Context], [Description$] Equivalent to the File Record Macro and the Macro Record dialog boxes. Starts the macro recorder. If Name$ is not given, the next default recording name (Macron) is used. Context is 0 for global (def), 1 for document template. The Description$ refers to the text that appears in status bar if macro is assigned to a menu. ---------------------------------------- ---------------------------------------- MacroRun ........................................ Syntax: MacroRun Name$, [ShowAll] Equivalent to the Macro Run dialog box. Runs the named macro or command. If ShowAll is 1, built-in commands are included. ---------------------------------------- ---------------------------------------- MenuMode ........................................ Syntax: MenuMode Activates menu mode. Equivalent to pressing Alt or F10. ---------------------------------------- ---------------------------------------- Mid$() ........................................ Syn:Num = Mid$(Source$, Index, [Count]) Returns Count characters from Source$, starting at character Index. If Count is not supplied, the rest of the string is returned. ---------------------------------------- ---------------------------------------- MkDir ........................................ Syntax: MkDir Name$ Creates the directory specified by DirName$. ---------------------------------------- ---------------------------------------- MoveText ........................................ Syntax: MoveText Moves text. Equivalent to pressing F2. Note: this action does not use the Clipboard. ---------------------------------------- ---------------------------------------- MsgBox ........................................ Button: Icons: Def Button: 0 OK 0 no icon 0 1st 1 OK/Cancel 16 Hand 256 2nd 2 Abt/Rtry/Ignore 32 "?" icon 512 3rd 3 Yes/No/Cancel 48 "!" icon 4 Yes/No 64 "*" icon 5 Retry/Cancel Negative Type values: -1 Display message permanently -2 Display until mouse/key event occurs -8 Use entire status bar width ---------------------------------------- ---------------------------------------- MsgBox ........................................ Syntax: Message$, [Title$], [Type] Creates a message box displaying Message$. Title$ is the title of the message box. If it is not supplied, "Microsoft Word" is the title of the message box.Type determines the symbol and buttons displayed in the box.If Type is negative, then the message is displayed in the status bar and Type must be -1, -2, or -8. ---------------------------------------- ---------------------------------------- MsgBox() ........................................ Syn:Num=MsgBox(Message$,[Title$],[Type]) Returns one of the following values: -1 Leftmost button OK/Yes/Abort 0 Next button Cancel/No/Retry 1 Next button Cancel/Ignore ---------------------------------------- ---------------------------------------- Name ........................................ Syntax: Name OldName$ As NewName$ Renames a file. If the new filename specified already exists, an error is generated. ---------------------------------------- ---------------------------------------- NextCell ........................................ Syntax: NextCell Moves the selection to the beginning of the next cell in a table. ---------------------------------------- ---------------------------------------- NextCell() ........................................ Syntax: Log = NextCell() Moves to the next cell. Returns 0 (zero) if there is no next cell. ---------------------------------------- ---------------------------------------- NextField ........................................ Syntax: NextField Moves the selection to the next field result. Skips over marker fields, such as Index Entry fields. ---------------------------------------- ---------------------------------------- NextField() ........................................ Syntax: Log = NextField() Moves to the next field. Returns 0 (zero) if there is no next field. ---------------------------------------- ---------------------------------------- NextObject ........................................ Syntax: NextObject Selects the next object in page view. ---------------------------------------- ---------------------------------------- NextObject() ........................................ Syntax: Log = NextObject() Moves to the next positioned object. Returns 0 (zero) if there is no next object. ---------------------------------------- ---------------------------------------- NextPage ........................................ Syntax: NextPage Moves the insertion point to the beginning of the next page in page view. ---------------------------------------- ---------------------------------------- NextPage() ........................................ Syntax: Log = NextPage() Moves the insertion point to the beginning of the next page. Returns 0 (zero) if there is no next page. ---------------------------------------- ---------------------------------------- NextTab() ........................................ Syntax: Num = NextTab(Pos) Returns the position of the next tab stop to the right of Pos. Pos is a number given in points. If more than one paragraph is selected and the tabs do not all match, -1 is returned. ---------------------------------------- ---------------------------------------- NextWindow ........................................ Syntax: NextWindow Moves the selection to the next document window. ---------------------------------------- ---------------------------------------- NormalStyle ........................................ Syntax: NormalStyle Formats the selection in Normal paragraph format. ---------------------------------------- ---------------------------------------- NormalStyle() ........................................ Syntax: Num = NormalStyle() Returns 1 if all of the selection has the Normal style, 0 (zero) if none of the selection has the Normal style, and -1 if part of the selection has the Normal style. ---------------------------------------- ---------------------------------------- OK ........................................ Syntax: OK Terminates a copy or move operation and performs its action. ---------------------------------------- ---------------------------------------- On Error ........................................ Syntax: On Error Goto Label Syntax: On Error Resume Next Syntax: On Error Goto 0 The On Error control structure allows the programmer to "trap" an error so that the program can perform its own error handling. See WTR for details. ---------------------------------------- ---------------------------------------- OnTime ........................................ Syntax: OnTime When$,Name$,[Tolerance] Executes the macro specified by Name$ at the time specified by When$. When$ is a text representation of the time for execution in a 24-hour format. When$ can also include a date string that precedes the time string. If the date is not specified, the macro is run at the first occurence of the specified time. ---------------------------------------- ---------------------------------------- OnTime (more) ........................................ The macro is executed the next time Word is idle after specfied When$. Word does not run the macro if more than Tolerance seconds have elapsed since When$, and the macro has not yet run. If Tolerance is 0 (zero), or not supplied, Word will always run the macro, regardless of how long it is before Word is idle and can run the macro. ---------------------------------------- ---------------------------------------- Open ........................................ Syntax: Open Name$ For Mode$ As [#]StreamNumber Opens the file or device specified by Name$. The Name$ can be a device such as Com1 or Lpt1, and must be enclosed in quotation marks. Do not include the colon following the device name. ---------------------------------------- ---------------------------------------- OpenUpPara ........................................ Syntax: OpenUpPara Adds one line of space before the current paragraph. ---------------------------------------- ---------------------------------------- OtherPane ........................................ Syntax: OtherPane Moves the selection to the other pane of the current window. ---------------------------------------- ---------------------------------------- OutlineCollapse ........................................ Syntax: OutlineCollapse Collapses the lowest level of subtext levels under the selected heading. ---------------------------------------- ---------------------------------------- OutlineDemote ........................................ Syntax: OutlineDemote Increases the heading level of the selection by one. ---------------------------------------- ---------------------------------------- OutlineExpand ........................................ Syntax: OutlineExpand Expands the lowest level of subtext under the selected heading. ---------------------------------------- ---------------------------------------- OutlineLevel() ........................................ Syntax: Num = OutlineLevel() Returns the heading level of the specified paragraph. Returns 0 (zero) if the specified paragraph doesn't have a defined level (body text, for example). ---------------------------------------- ---------------------------------------- OutlineMoveDown ........................................ Syntax: OutlineMoveDown Moves the selection below the next visible heading. ---------------------------------------- ---------------------------------------- OutlineMoveUp ........................................ Syntax: OutlineMoveUp Moves the selection above the next visible heading. ---------------------------------------- ---------------------------------------- OutlinePromote ........................................ Syntax: OutlinePromote Decreases the heading level of the selection by one. ---------------------------------------- ---------------------------------------- OutlineShowFirstLine ........................................ Syntax: OutlineShowFirstLine [On] If On is omitted, toggles the state. Changes the view of non-heading level text. If On is nonzero, only first line of text is shown, if On is 0 (zero), all text is shown. ---------------------------------------- ---------------------------------------- Overtype ........................................ Syntax: Overtype [On] Without the argument, toggles over- typing mode.If On is nonzero, overtype mode is activated and OVR is displayed in the status bar. If On is 0 (zero), overtype mode is deactivated. ---------------------------------------- ---------------------------------------- Overtype() ........................................ Syntax: Log = Overtype() Returns -1 if overtype mode is on, 0 (zero) if overtype mode is off. ---------------------------------------- ---------------------------------------- PageDown ........................................ Syntax: PageDown [Repeat], [Select] Moves the selection down by Repeat screens. If the Repeat argument is omitted, 1 is assumed. If Select is nonzero, the selection is extended down by Repeat screens. Equivalent to the PgDn key. If Select is 0 (zero) or omitted, the selection is not extended. ---------------------------------------- ---------------------------------------- PageDown() ........................................ Syntax: Log=PageDown([Repeat],[Select]) Moves the selection down by Repeat pages. Returns -1 if operation was successful, returns 0 (zero) if not. ---------------------------------------- ---------------------------------------- PageUp ........................................ Syntax: PageUp [Repeat], [Select] Moves the selection up by Repeat screens. If the Repeat argument is omitted, 1 is assumed. If Select is nonzero, the selection is extended up by Repeat screens. Equivalent to the PgUp key. If Select is 0 (zero) or omitted, the selection is not extended. ---------------------------------------- ---------------------------------------- PageUp() ........................................ Syntax: Log=PageUp ([Repeat],[Select]) Moves the selection up by Repeat pages. Returns -1 if operation was successful, returns 0 (zero) if not. ---------------------------------------- ---------------------------------------- ParaDown ........................................ Syntax: ParaDown [Repeat], [Select] Moves the selection down by Repeat paragraphs. If Repeat is omitted, 1 is assumed. If Select is nonzero, the selection is extended down by Repeat paragraphs. ---------------------------------------- ---------------------------------------- ParaDown() ........................................ Syntax: Log=ParaDown([Repeat],[Select]) Moves the selection down by Repeat paragraphs. Returns 0 (zero) if the action cannot be performed. For example, the function returns 0 if the insertion point is at the end of the document. ---------------------------------------- ---------------------------------------- ParaUp ........................................ Syntax: ParaUp [Repeat], [Select] Moves the selection up by Repeat paragraphs. If Repeat is omitted, 1 is assumed. If Select is nonzero, the selection is extended up by Repeat paragraphs. ---------------------------------------- ---------------------------------------- ParaUp() ........................................ Syntax: Log=ParaUp([Repeat],[Select]) Moves the selection up by Repeat paragraphs. Returns 0 (zero) if the action cannot be performed. For example, the function returns 0 if the insertion point is at the beginning of the document. ---------------------------------------- ---------------------------------------- PauseRecorder ........................................ Syntax: PauseRecorder Stops macro recording until PauseRecorder is executed again. ---------------------------------------- ---------------------------------------- PrevCell ........................................ Syntax: PrevCell Moves the selection to the previous cell. ---------------------------------------- ---------------------------------------- PrevCell() ........................................ Syntax: Log = PrevCell() Moves selection to the previous cell. Returns 0 (zero) when the selection is in the first cell. ---------------------------------------- ---------------------------------------- PrevField ........................................ Syntax: PrevField Moves the selection to the previous field. ---------------------------------------- ---------------------------------------- PrevField() ........................................ Syntax: Log = PrevField() Moves selection to the previous field. Returns 0 (zero) when the selection is in the first field. ---------------------------------------- ---------------------------------------- PrevObject ........................................ Syntax: PrevObject Selects the previous object in page view. ---------------------------------------- ---------------------------------------- PrevObject() ........................................ Syntax: Log = PrevObject() Selects the previous object. Returns 0 (zero) when the selection is at the first object or text area. ---------------------------------------- ---------------------------------------- PrevPage ........................................ Syntax: PrevPage In page view, moves the insertion point to the beginning of the previous actual page. ---------------------------------------- ---------------------------------------- PrevPage() ........................................ Syntax: Log = PrevPage() Moves to the previous page. Returns 0 (zero) when the selection is at the first actual page. ---------------------------------------- ---------------------------------------- PrevTab() ........................................ Syntax: Log = PrevTab(Pos) Returns the position of the next tab to the left of Pos. Pos is a number given in points. If more than one paragraph is selected and the tabs do not all match, -1 is returned. ---------------------------------------- ---------------------------------------- PrevWindow ........................................ Syntax: PrevWindow Activates the previously active window. ---------------------------------------- ---------------------------------------- Print ........................................ Syn: Print [[#]StreamNumber],Expression Writes Expression to the file specified by StreamNumber. With no StreamNumber specified, output goes to the status bar. ---------------------------------------- ---------------------------------------- Read ........................................ Syn: Read [#]StreamNumber, Variable(s) Similar to the Input statement, but removes quotation marks for strings. This statement is used with the Write statement. ---------------------------------------- ---------------------------------------- RecordNextCommand ........................................ Syntax: RecordNextCommand Records the next command at the insertion point in the current macro window. ---------------------------------------- ---------------------------------------- Rem ........................................ Syntax: Rem Remarks Syntax: 'Remarks Inserts explanatory text into the macro. You can use an apostrophe (') instead of a Rem statement. If a Rem statement follows other statements on a line, it must be separated from those statements by a colon (:). A colon is not required before a remark introduced by an apostrophe. ---------------------------------------- ---------------------------------------- RenameMenu ........................................ Syntax: RenameMenu MenuNumber, NewText$ Renames the top level menu of Menu Number to New Text$. MenuNumber represents the name of a menu. NewText$ replaces the menu name. An ampersand (&) preceding a character makes it the keyboard equivalent to selecting from the menu. MenuNumber: 0 File 3 Insert 6 Macro 1 Edit 4 Format 7 Window 2 View 5 Utilities ---------------------------------------- ---------------------------------------- Repeat ........................................ Syntax: Repeat Repeats the last command. ---------------------------------------- ---------------------------------------- RepeatSearch ........................................ Syntax: RepeatSearch Repeats the most recent search. ---------------------------------------- ---------------------------------------- ResetChar ........................................ Syntax: ResetChar Removes manual character formatting from the selected text. Manual character formatting is formatting that is not applied as a style. For example, you manually format a word or phrase in a paragraph as bold text if the paragraph style is normal text. The text is left with the character formatting of the current style. ---------------------------------------- ---------------------------------------- ResetChar() ........................................ Syntax: Num = ResetChar() Returns 1 if the selected text contains no manual character formatting. Returns 0 (zero) if any manual character formatting is present. ---------------------------------------- ---------------------------------------- ResetFootnoteContNotice ........................................ Syntax: ResetFootnoteContNotice Resets the footnote continuation notice to the default value. ---------------------------------------- ---------------------------------------- ResetFootnoteContSep ........................................ Syntax: ResetFootnoteContSep Resets the footnote continuation separator to the default value. ---------------------------------------- ---------------------------------------- ResetFootnoteSep ........................................ Syntax: ResetFootnoteSep Resets the footnote separator to the default value. ---------------------------------------- ---------------------------------------- ResetPara ........................................ Syntax: ResetPara Removes manual paragraph formatting from the selected text. The text is left with the paragraph formatting of the current style. ---------------------------------------- ---------------------------------------- ResetPara() ........................................ Syntax: Num = ResetPara() Returns 1 if the selected text contains no manual paragraph formatting. Returns 0 (zero) if any manual paragraph formatting is present. ---------------------------------------- ---------------------------------------- Right$() ........................................ Syntax: A$ = Right$(Source$, Count) Returns the rightmost Count characters of Source$. ---------------------------------------- ---------------------------------------- RightPara ........................................ Syntax: RightPara Right aligns the selected paragraphs. ---------------------------------------- ---------------------------------------- RightPara() ........................................ Syntax: Num = RightPara() Returns 0 (zero) if none of the selected paragraphs are right aligned, 1 if all of the selected paragraphs are right aligned, or -1 if more than one kind of paragraph alignment is used. ---------------------------------------- ---------------------------------------- RmDir ........................................ Syntax: RmDir Name$ Removes the specified directory or subdirectory. Files must first be removed from the subdirectory for this statement to work. ---------------------------------------- ---------------------------------------- Rnd() ........................................ Syntax: Num = Rnd([Expression]) Returns a random fractional value between 0 (zero) and 1. The Expression is not used by WordBASIC, but is provided for compatibility with other forms of BASIC. ---------------------------------------- ---------------------------------------- RulerMode ........................................ Syntax: RulerMode Switches to ruler mode. ---------------------------------------- ---------------------------------------- SaveTemplate ........................................ Syntax: SaveTemplate Saves the document template. ---------------------------------------- ---------------------------------------- Seek ........................................ Syntax: Seek [#]StreamNumber, Count Positions file pointer at character Count in the file attached to stream StreamNumber. ---------------------------------------- ---------------------------------------- Seek() ........................................ Syntax: Num = Seek([#]StreamNumber) Returns the current file pointer for the specified StreamNumber. ---------------------------------------- ---------------------------------------- Select Case ........................................ The expression is compared with all values given in each CaseExpression until a match is found. If a match is found, the statement(s) following the CaseExpression are executed. If there is no match and there is a Case Else, those statement(s) are executed. ---------------------------------------- ---------------------------------------- Select Case (example) ........................................ Select Case Expression Case CaseExpression Statement(s) [Case Else Statement(s)] End Select ---------------------------------------- ---------------------------------------- Selection$() ........................................ Syntax: A$ = Selection$() Returns the plain, unformatted text of the selection. The maximum limit on the selection is 32,000 characters or until memory runs out. If the selection is too large,Selection$() is filled with as much of the selection as will fit, and an error is generated. If the selection is an insertion point, the character follow- ing the insertion point is returned. ---------------------------------------- ---------------------------------------- SelectTable ........................................ Syntax: SelectTable Selects the table containing the insertion point. ---------------------------------------- ---------------------------------------- SelType ........................................ Syntax: SelType Type Changes the selection highlighting to Type. Type refers to one of the following: 0 Hidden 1 Insertion point 2 Selection 4 Dotted selection or insertion point (whatever is current) 5 Dotted insertion point 6 Dotted selection ---------------------------------------- ---------------------------------------- SelType() ........................................ Syntax: Num = SelType() Returns the type of the selection highlighting. ---------------------------------------- ---------------------------------------- SendKeys ........................................ Syntax: SendKeys Keys$, [Wait] Sends the keys specified to the active application, just as if they were typed at the keyboard. If Word is not the active application and Wait is -1, Word waits for all keys to be processed before proceeding. Keys$ is represented by one or more characters, such as a for the character a, {Enter} for the Enter key, and {33} for PgUp. ---------------------------------------- ---------------------------------------- SendKeys (Key Codes) ........................................ {backspace} {home} Symbols: {bs} or {bksp} {insert} % Alt {break} {left} ^ Ctrl {capslock} {numlock} + Combine {clear} {pgdn} keys {delete} or {del} {pgup} {key #} to {down} {prtsc} repeat key {end} {right} {enter} {tab} {escape} or {esc} {up} {help} {F1-16} ---------------------------------------- ---------------------------------------- SetDirty ........................................ Syntax: SetDirty [Dirty] Makes Word recognize the current document as "dirty," or a changed document. If Dirty is omitted or 1, the document is made dirty. If 0 (zero), it makes the document not dirty. ---------------------------------------- ---------------------------------------- SetEndOfBookmark ........................................ Syntax: SetEndOfBookmark Bookmark1$, [Bookmark2$] Sets Bookmark2$ to the end point of Bookmark1$. If Bookmark2$ is not supplied, Bookmark1$ is set to its own end. ---------------------------------------- ---------------------------------------- SetGlossary ........................................ Syn: SetGlossary Name$,Text$,[Context] Defines a glossary entry called Name$ containing the text Text$. Context is 0 (zero) for global, 1 for document template. ---------------------------------------- ---------------------------------------- SetProfileString ........................................ Syn:SetProfileString [App$],Key$,Value$ Sets a value in the current WIN.INI. App$ is the name of the Microsoft Windows application. If the applicat- ion is not specified, the string Microsoft Word is used. ---------------------------------------- ---------------------------------------- SetStartOfBookmark ........................................ Syntax: SetStartOfBookmark Bookmark1$, [Bookmark2$] Sets Bookmark2$ to the starting point of Bookmark1$. If Bookmark2$ is not given, Bookmark1$ is set to its own start. ---------------------------------------- ---------------------------------------- Sgn() ........................................ Syntax: Num = Sgn(n) Returns the sign of n. Returns 1 for a positive number, -1 for a negative number, or 0 for zero. ---------------------------------------- ---------------------------------------- Shell ........................................ Syntax: Shell App$, [WindowStyle] Starts another program under Microsoft Windows. App$ uses the same format as the File Run command in the Windows MS-DOS Executive, including any switches or arguments that the program accepts. If App$ is the name of a file with an extension specific to an inst- alled application the statement starts the application and loads that file. WS= 0/2(icon) 1(normal) 3(zoomed) 4(deactiv) ---------------------------------------- ---------------------------------------- ShowAll ........................................ Syntax: ShowAll [On] Without the argument, toggles ShowAll option of the View Preference command. If On is nonzero, shows all invisible objects such as hidden text, tabs, spaces, paragraph marks, and so on. If On is 0 (zero), turns off ShowAll option. ---------------------------------------- ---------------------------------------- ShowAllHeadings ........................................ Syntax: ShowAllHeadings Shows all text in outline view. ---------------------------------------- ---------------------------------------- ShowHeading1 ........................................ Syntax: ShowHeading1 Shows up to Level 1 headings and hides subordinate headings. ---------------------------------------- ---------------------------------------- ShowHeading2 ........................................ Syntax: ShowHeading2 Shows up to Level 2 headings and hides subordinate headings. ---------------------------------------- ---------------------------------------- ShowHeading3 ........................................ Syntax: ShowHeading3 Shows up to Level 3 headings and hides subordinate headings. ---------------------------------------- ---------------------------------------- ShowHeading4 ........................................ Syntax: ShowHeading4 Shows up to Level 4 headings and hides subordinate headings. ---------------------------------------- ---------------------------------------- ShowHeading5 ........................................ Syntax: ShowHeading5 Shows up to Level 5 headings and hides subordinate headings. ---------------------------------------- ---------------------------------------- ShowHeading6 ........................................ Syntax: ShowHeading6 Shows up to Level 6 headings and hides subordinate headings. ---------------------------------------- ---------------------------------------- ShowHeading7 ........................................ Syntax: ShowHeading7 Shows up to Level 7 headings and hides subordinate headings. ---------------------------------------- ---------------------------------------- ShowHeading8 ........................................ Syntax: ShowHeading8 Shows up to Level 8 headings and hides subordinate headings. ---------------------------------------- ---------------------------------------- ShowHeading9 ........................................ Syntax: ShowHeading9 Shows up to Level 9 headings and hides subordinate headings. ---------------------------------------- ---------------------------------------- ShowVars ........................................ Syntax: ShowVars Displays the list of variables (and their values) currently in use. This statement is useful for debugging macros. ---------------------------------------- ---------------------------------------- ShrinkFont ........................................ Syntax: ShrinkFont Decreases the size of the selected font. Can be used either on the selection or at the insertion point. ---------------------------------------- ---------------------------------------- ShrinkSelection ........................................ Syntax: ShrinkSelection Shrinks the selection to the next smallest unit (word, sentence, paragraph, etc.). ---------------------------------------- ---------------------------------------- SmallCaps ........................................ Syntax: SmallCaps [On] Without the argument, toggles small caps for the entire selection. If On is nonzero, makes the entire selection small caps. If On is 0 (zero), removes small caps from the entire selection. ---------------------------------------- ---------------------------------------- SmallCaps() ........................................ Syntax: Num = SmallCaps() Returns 0 (zero) if none of the selection is small caps, 1 if all of the selection is small caps, or -1 if part of the selection is small caps. ---------------------------------------- ---------------------------------------- SpacePara1 ........................................ Syntax: SpacePara1 Formats the selected paragraphs with single spacing. ---------------------------------------- ---------------------------------------- SpacePara1() ........................................ Syntax: Num = SpacePara1() Returns 0 (zero) if none of the selected paragraphs are single-spaced, 1 if all of the selected paragraphs are single-spaced, or -1 if more than one kind of paragraph spacing is used. ---------------------------------------- ---------------------------------------- SpacePara15 ........................................ Syntax: SpacePara15 Formats the selected paragraphs with one-and-one-half line spacing. ---------------------------------------- ---------------------------------------- SpacePara15() ........................................ Syntax: Num = SpacePara15() Returns 0 (zero) if none of the selected paragraphs are one-and-one-half spaced, 1 if all of the selected paragraphs are one-and-one-half spaced, or -1 if more than one kind of paragraph spacing is used. ---------------------------------------- ---------------------------------------- SpacePara2 ........................................ Syntax: SpacePara2 Formats the selected paragraphs with double spacing. ---------------------------------------- ---------------------------------------- SpacePara2() ........................................ Syntax: Num = SpacePara2() Returns 0 (zero) if none of the selected paragraphs are double-spaced, 1 if all of the selected paragraphs are double-spaced, or -1 if more than one kind of paragraph spacing is used. ---------------------------------------- ---------------------------------------- Spike ........................................ Syntax: Spike Deletes the selection after copying it to the special glossary called the Spike. ---------------------------------------- ---------------------------------------- StartOfColumn ........................................ Syntax: StartOfColumn [Select] Moves insertion point to topmost position in the currently selected table column. If Select is nonzero, extends the selection. ---------------------------------------- ---------------------------------------- StartOfDocument ........................................ Syntax: StartOfDocument [Select] Moves the selection to the beginning of the document. If Select is nonzero, extends the selection. ---------------------------------------- ---------------------------------------- StartOfLine ........................................ Syntax: StartOfLine [Select] Moves the selection to the beginning of the line. If Select is nonzero, extends the selection. ---------------------------------------- ---------------------------------------- StartOfRow ........................................ Syntax: StartOfRow [Select] Moves insertion point to the leftmost position in the currently selected table row. If Select is nonzero, extends the selection. ---------------------------------------- ---------------------------------------- StartOfWindow ........................................ Syntax: StartOfWindow [Select] Moves the insertion point to the top left corner of the window. If Select is nonzero, extends the selection. ---------------------------------------- ---------------------------------------- Stop ........................................ Syntax: Stop Stops a running macro and displays a message that the macro was interrupted. ---------------------------------------- ---------------------------------------- Str$() ........................................ Syntax: A$ = Str$(n) Returns the string representation of value n. Positive numbers have a leading space character. ---------------------------------------- ---------------------------------------- String$() ........................................ Syntax: A$ = String$(Count, Source$) Returns the first character in Source$ repeated Count times. Replacing Source$ with the number m representing the ASCII value of Source$ returns the character with ANSI code m repeated Count times. ---------------------------------------- ---------------------------------------- StyleName$() ........................................ Syntax:A$ = StyleName$([Count], [Context], [All]) Returns the name of the style defined in the given context (global or document template). Count may be in the range from 1 to CountStyles (Context). If Count is 0 (zero), the name of the current style is returned; otherwise, the name is taken from the list in the given context (0 for global, 1 for document template). ---------------------------------------- ---------------------------------------- Sub...End Sub ........................................ Syntax: Sub Name [ParameterList] Statement(s) End Sub Defines a subroutine. See WTR for more information (Macros: Introduction) ---------------------------------------- ---------------------------------------- SubScript ........................................ Syntax: SubScript [On] Without the argument, toggles subscript for the entire selection. If On is nonzero, makes the entire selection subscript. If On is 0 (zero), removes subscript from the entire selection. ---------------------------------------- ---------------------------------------- SubScript() ........................................ Syntax: Num = SubScript() Returns 0 (zero) if none of the selection is subscript, 1 if all of the selection is subscript, or -1 if part of the selection is subscript or superscript. ---------------------------------------- ---------------------------------------- SuperScript ........................................ Syntax: SuperScript [On] Without the argument, toggles superscript for the entire selection. If On is nonzero, makes the entire selection superscript. If On is 0 (zero), removes superscript from the entire selection. ---------------------------------------- ---------------------------------------- SuperScript() ........................................ Syntax: Num = SuperScript() Returns 0 (zero) if none of the selection is superscript, 1 if all of the selection is superscript, or -1 if part of the selection is superscript or subscript. ---------------------------------------- ---------------------------------------- TabLeader$() ........................................ Syntax: A$ = TabLeader$(Pos) Returns the leader character of the tab at Pos points. If more than one paragraph is selected and all the tabs don't match, an empty string is returned. The leader characters returned are blank space, period, hyphen, and underscore. ---------------------------------------- ---------------------------------------- TabType() ........................................ Syntax: Num = TabType(Pos) Returns the type of tab at the given position Pos. If more than one paragraph is selected and all the tabs don't match, -1 is returned. If the tabs match, the type is returned as follows: 0 Left-aligned 1 Centered 2 Right-aligned 3 Justified ---------------------------------------- ---------------------------------------- Time$() ........................................ Syntax: A$ = Time$() Returns the current time in the default format. ---------------------------------------- ---------------------------------------- ToggleFieldDisplay ........................................ Syntax: ToggleFieldDisplay Toggles the display between field codes and field results. ---------------------------------------- ---------------------------------------- UCase$() ........................................ Syntax: A$ = UCase$(A$) Returns A$ converted to uppercase. ---------------------------------------- ---------------------------------------- Underline ........................................ Syntax: Underline [On] Without the argument, toggles underlining for the entire selection. If On is nonzero, makes the entire selection underlined. If On is 0 (zero), removes underlining from the entire selection. ---------------------------------------- ---------------------------------------- Underline() ........................................ Syntax: Num = Underline() Returns 0 (zero) if none of the selection is underlined, 1 if all of the selection is underlined, or -1 if part of the selection is underlined or more than one kind of underlining is used. ---------------------------------------- ---------------------------------------- UnHang ........................................ Syntax: UnHang Reduces the amount of indent in a hanging indent. ---------------------------------------- ---------------------------------------- UnIndent ........................................ Syntax: UnIndent Removes the indent from the selected paragraphs. The first paragraph is aligned with the previous tab stop. ---------------------------------------- ---------------------------------------- UnLinkFields ........................................ Syntax: UnLinkFields Converts the selected fields to plain text and uses the last result. ---------------------------------------- ---------------------------------------- UnLockFields ........................................ Syntax: UnLockFields Unlocks fields in the current selection for updating. ---------------------------------------- ---------------------------------------- UnSpike ........................................ Syntax: UnSpike Empties the Spike glossary and inserts all contents into the document at the selection. ---------------------------------------- ---------------------------------------- UpdateFields ........................................ Syntax: UpdateFields Updates the fields in the selection. ---------------------------------------- ---------------------------------------- UpdateSource ........................................ Syntax: UpdateSource Sends changes in linked Word documents back to their source. ---------------------------------------- ---------------------------------------- UtilCalculate ........................................ Syntax: UtilCalculate Equivalent to the Calculate command on the Utilities menu. The selection is evaluated as a mathematical expression. The result of the evaluation is placed on the Clipboard. ---------------------------------------- ---------------------------------------- UtilCalculate() ........................................ Syn: Num = UtilCalculate([Expression$]) Evaluates Expression. With the arg- ument, this function is equivalent to the = field. Values in Expression can be table cell references. Without an expression, performs the same oper- ation as the UtilCalculate statement, but returns the result rather than placing it on the Clipboard. See WTR for more information on the = field. ---------------------------------------- ---------------------------------------- UtilCompareVersions ........................................ Syntax: UtilCompareVersions Name$ Equivalent to the Utilities Compare Versions dialog box. Compares the current document with the document specified by Name$. ---------------------------------------- ---------------------------------------- UtilCustomize ........................................ Syntax:UtilCustomize [AutoSave],[Units], [Pagination],[SummaryPrompt], [ReplaceSelection],[Name$], [Initials$],[ButtonFieldClicks] Equivalent to the Utilities Customize dialog box. Some arguments take measurements in points or num- bers. Other arguments correspond to check boxes. ---------------------------------------- ---------------------------------------- UtilGetSpelling ........................................ Syntax: UtilGetSpelling FillArray$(), [Word$],[MainDic$],[SuppDic$] Fills the string array FillArray$ with all available spellings for a word. If Word$ is supplied, that word is used. If it is not supplied, Word uses the word closest to the insertion point. The spellings for each defin- ition are appended in the order they appear in the spelling checker. ---------------------------------------- ---------------------------------------- UtilGetSpelling (example) ........................................ Sub MAIN Dim S$(10) UtilGetSpelling S$(), "color" For x = 0 To 9 MsgBox S$(x) Next x End Sub ---------------------------------------- ---------------------------------------- UtilGetSpelling() ........................................ Syn: Log=UtilGetSpelling(FillArray$(), [Word$],[MainDic$],[SuppDic$]) Fills the string array FillArray$ with all available spellings of a word. If Word$ is supplied, that word is used. If it is not supplied, Word uses the word closest to the insertion point. The spellings for each definition are appended in the order they appear in the spelling checker. Returns 0 if the word is spelled correctly. ---------------------------------------- ---------------------------------------- UtilGetSynonyms ........................................ Syn:UtilGetSynonyms FillArray$(),[Word$] Fills the string array FillArray$ with all available synonyms for Word$. If Word$ is not supplied, the word nearest the selection is used. ---------------------------------------- ---------------------------------------- UtilGetSynonyms() ........................................ Syn: Log = UtilGetSynonyms(FillArray$(), [Word$]) Fills the string array FillArray$ with all available synonyms for Word$. If Word$ is not supplied, the word nearest the selection is used. Returns 0 (zero) if there are no synonyms available and returns -1 if one or more synonyms are available. ---------------------------------------- ---------------------------------------- UtilHyphenate ........................................ Syntax: UtilHyphenate [HyphenateCaps], [Confirm],[HotZone[$]] Equivalent to the Utilities Hyphenate dialog box. The arguments correspond to check boxes. ---------------------------------------- ---------------------------------------- UtilRenumber ........................................ Syntax: UtilRenumber [NumParas],[Type], [StartAt],[ShowAllLevels],[Format$] Equivalent to the Utilities Renumber dialog box. The arguments correspond to check boxes. ---------------------------------------- ---------------------------------------- UtilRepaginateNow ........................................ Syntax: UtilRepaginateNow Equivalent to the Repaginate Now command on the Utilities menu. Forces repagination of the entire document. ---------------------------------------- ---------------------------------------- UtilRevisionMarks ........................................ Syn: UtilRevisionMarks [MarkRevisions], [RevisionBars],[NewText] Equivalent to the Utilities Revision Marks dialog box. The arguments correspond to check boxes. The Search (for next text with revision marking) Accept Revisions or Undo Revisions command button name can be appended. ---------------------------------------- ---------------------------------------- UtilSort ........................................ Syntax: UtilSort [Order],[Type], [Separator],[FieldNum[$]], [SortColumn],[CaseSensitive] Equivalent to the Utilities Sort dialog box. ---------------------------------------- ---------------------------------------- UtilSpelling ........................................ Syntax: UtilSpelling [Word$], [MainDic$],[SuppDic$], [IgnoreCaps],[AlwaysSuggest] Equivalent to the Utilities Spelling dialog box. The arguments correspond to check boxes. The Delete command button name can be appended to remove the word from the current supplemental dictionary. ---------------------------------------- ---------------------------------------- UtilSpellSelection ........................................ Syntax: UtilSpellSelection Checks the selection. If the selection is only part of a word, the selection is expanded to include the whole word. The default supplemental dictionary is used. ---------------------------------------- ---------------------------------------- UtilThesaurus ........................................ Syntax: UtilThesaurus Lists alternative words for the selection. Equivalent to the Thesaurus command on the Utilities menu. ---------------------------------------- ---------------------------------------- Val() ........................................ Syntax: Num = Val(A$) Returns the numeric value of A$. ---------------------------------------- ---------------------------------------- ViewAnnotations ........................................ Syntax: ViewAnnotations [On] Turns on the annotations pane if On is nonzero, turns off the annotations pane is On is 0 (zero). Without the argument, toggles the annotations pane on and off. ---------------------------------------- ---------------------------------------- ViewAnnotations() ........................................ Syntax: Log = ViewAnnotations() Returns -1 if annotations view mode is on, 0 (zero) if annotations view mode is off. ---------------------------------------- ---------------------------------------- ViewDraft ........................................ Syntax: ViewDraft [On] Turns on draft view mode if On is nonzero, turns off draft view mode if On is 0 (zero). Without the argument, toggles draft view mode. If no window is open, the first window opened is opened in draft view. ---------------------------------------- ---------------------------------------- ViewDraft() ........................................ Syntax: Log = ViewDraft() Returns -1 if draft view mode is on, 0 (zero) if draft view mode is off. ---------------------------------------- ---------------------------------------- ViewFieldCodes ........................................ Syntax: ViewFieldCodes [On] Turns on field codes view mode if On is nonzero, turns off field codes view mode if On is 0 (zero). Without the argument, toggles field codes view mode. If no window is open, the first window opened shows field codes. ---------------------------------------- ---------------------------------------- ViewFieldCodes() ........................................ Syntax: Log = ViewFieldCodes() Returns -1 if field codes view mode is on, 0 (zero) if field codes view mode is off. ---------------------------------------- ---------------------------------------- ViewFootnotes ........................................ Syntax: ViewFootnotes [On] Turns on footnotes view mode if On is nonzero, turns off footnotes view mode if On is 0 (zero). Without the argument, toggles footnotes view mode. If no window is open, the first window opened is opened in footnotes view. ---------------------------------------- ---------------------------------------- ViewFootnotes() ........................................ Syntax: Log = ViewFootnotes() Returns -1 if footnotes view mode is on, 0 (zero) if footnotes view mode is off. ---------------------------------------- ---------------------------------------- ViewFullMenus ........................................ Syntax: ViewFullMenus Turns on full menus. ---------------------------------------- ---------------------------------------- ViewMenus() ........................................ Syntax: Num = ViewMenus() Returns the menu state as follows: 0 Normal short menus 1 Normal full menus 2 No document short menus 3 No document full menus ---------------------------------------- ---------------------------------------- ViewOutline ........................................ Syntax: ViewOutline [On] Turns on outline view mode if On is nonzero, turns off outline view mode if On is 0 (zero). Without the argument, toggles outline view mode. If no window is open, the first window opened is opened in outline view. ---------------------------------------- ---------------------------------------- ViewOutline() ........................................ Syntax: Log = ViewOutline() Returns -1 if outline view mode is on, 0 (zero) if outline view mode is off. ---------------------------------------- ---------------------------------------- ViewPage ........................................ Syntax: ViewPage [On] Turns on page view mode if On is nonzero, turns off page view mode if On is 0 (zero). Without the argument, toggles page view mode. If no window is open, the first window opened is opened in page view. ---------------------------------------- ---------------------------------------- ViewPage() ........................................ Syntax: Log = ViewPage() Returns -1 if page view mode is on, 0 (zero) if page view mode is off. ---------------------------------------- ---------------------------------------- ViewPreferences ........................................ Syntax: ViewPreferences [Tabs],[Spaces], [Paras],[Hyphens],[Hidden], [ShowAll],[DisplayAsPrinted], [Pictures],[TextBoundaries], [HScroll],[VScroll],[TableGridlines], [StyleAreaWidth[$]] Equivalent to the View Preferences dialog box. ---------------------------------------- ---------------------------------------- ViewRibbon ........................................ Syntax: ViewRibbon [On] Turns on the ribbon if On is nonzero, turns off the ribbon if On is 0 (zero). Without the argument, toggles the ribbon. If no window is open, the first window opened is opened with the ribbon. ---------------------------------------- ---------------------------------------- ViewRibbon() ........................................ Syntax: Log = ViewRibbon() Returns -1 if the ribbon is on, 0 (zero) if the ribbon is off. ---------------------------------------- ---------------------------------------- ViewRuler ........................................ Syntax: ViewRuler [On] Turns on the ruler if On is nonzero, turns off the ruler if On is 0 (zero). Without the argument, toggles the ruler. If no window is open, the first window opened is opened with the ruler. ---------------------------------------- ---------------------------------------- ViewRuler() ........................................ Syntax: Log = ViewRuler() Returns -1 if the ruler is on, 0 (zero) if the ruler is off. ---------------------------------------- ---------------------------------------- ViewShortMenus ........................................ Syntax: ViewShortMenus [On] Turns on short menus if On is nonzero, turns off short menus if On is 0 (zero). Without the argument, toggles short menus. If no window is open, the first window opened is opened in short menus. ---------------------------------------- ---------------------------------------- ViewStatusBar ........................................ Syntax: ViewStatusBar [On] Turns on the status bar if On is nonzero, turns off the status bar if On is 0 (zero). Without the argument, toggles the status bar. ---------------------------------------- ---------------------------------------- ViewStatusBar() ........................................ Syntax: Log = ViewStatusBar() Returns -1 if the status bar is on, 0 (zero) if the status bar is off. ---------------------------------------- ---------------------------------------- VLine ........................................ Syntax: VLine [Count] Scrolls down vertically by Count lines. If Count is not specified, one line is the default. A negative Count scrolls up. ---------------------------------------- ---------------------------------------- VPage ........................................ Syntax: VPage [Count] Scrolls down vertically by Count screens. If Count is not specified, one screen is the default. A negative Count scrolls up. ---------------------------------------- ---------------------------------------- VScroll ........................................ Syntax: VScroll Percentage Scrolls vertically the specified percentage of the document length. ---------------------------------------- ---------------------------------------- VScroll() ........................................ Syntax: Num = VScroll() Returns the current vertical scroll position as a percentage of the document's size. ---------------------------------------- ---------------------------------------- While...Wend ........................................ Syntax: While Condition Statement(s) Wend Repeats the statements in the block while the Condition is True. If the Condition is initially False, the loop is never executed. ---------------------------------------- ---------------------------------------- Window() ........................................ Syntax: Num = Window() Returns the number of the currently selected window. The number ranges from 1 to the number of open windows. The number corresponds to the number on the Window menu. ---------------------------------------- ---------------------------------------- Window1 ........................................ Syntax: Window1 Selects Window 1. This number corresponds to the number on the Window menu. If you select a nonexistent window, an error is generated. ---------------------------------------- ---------------------------------------- Window2 ........................................ Syntax: Window2 Selects Window 2. This number corresponds to the number on the Window menu. If you select a nonexistent window, an error is generated. ---------------------------------------- ---------------------------------------- Window3 ........................................ Syntax: Window3 Selects Window 3. This number corresponds to the number on the Window menu. If you select a nonexistent window, an error is generated. ---------------------------------------- ---------------------------------------- Window4 ........................................ Syntax: Window4 Selects Window 4. This number corresponds to the number on the Window menu. If you select a nonexistent window, an error is generated. ---------------------------------------- ---------------------------------------- Window5 ........................................ Syntax: Window5 Selects Window 5. This number corresponds to the number on the Window menu. If you select a nonexistent window, an error is generated. ---------------------------------------- ---------------------------------------- Window6 ........................................ Syntax: Window6 Selects Window 6. This number corresponds to the number on the Window menu. If you select a nonexistent window, an error is generated. ---------------------------------------- ---------------------------------------- Window7 ........................................ Syntax: Window7 Selects Window 7. This number corresponds to the number on the Window menu. If you select a nonexistent window, an error is generated. ---------------------------------------- ---------------------------------------- Window8 ........................................ Syntax: Window8 Selects Window 8. This number corresponds to the number on the Window menu. If you select a nonexistent window, an error is generated. ---------------------------------------- ---------------------------------------- Window9 ........................................ Syntax: Window9 Selects Window 9. This number corresponds to the number on the Window menu. If you select a nonexistent window, an error is generated. ---------------------------------------- ---------------------------------------- WindowArrangeAll ........................................ Syntax: WindowArrangeAll Arranges all open windows so that windows do not overlap. ---------------------------------------- ---------------------------------------- WindowName$() ........................................ Syntax: A$ = WindowName$(n) Returns the title of the nth open window. The n corresponds to the number on the Window menu. If n is 0 (zero) or not supplied, the name of the current window is returned. ---------------------------------------- ---------------------------------------- WindowNewWindow ........................................ Syntax: WindowNewWindow Equivalent to the New Window command on the Window menu. Creates a copy of the current window. ---------------------------------------- ---------------------------------------- WindowPane() ........................................ Syntax: Num = WindowPane() If the window isn't split or if the top pane of the current window is selected, returns 1. If the bottom pane is selected, returns 3. ---------------------------------------- ---------------------------------------- WordLeft ........................................ Syntax: WordLeft [Repeat], [Select] Moves the insertion point left by Repeat words, extending the selection if Select is nonzero. ---------------------------------------- ---------------------------------------- WordLeft() ........................................ Syn: Log = WordLeft ([Repeat],[Select]) Moves the selection left by Repeat words. Returns 0 (zero) if the action cannot be performed. For example, the function returns 0 if the insertion point is at the beginning of the document. ---------------------------------------- ---------------------------------------- WordRight ........................................ Syntax: WordRight [Repeat], [Select] Moves the insertion point right by Repeat words, selecting if Select is nonzero. ---------------------------------------- ---------------------------------------- WordRight() ........................................ Syn:Log = WordRight([Repeat], [Select]) Moves the selection right by Repeat words. Returns 0 (zero) if the action cannot be performed. ---------------------------------------- ---------------------------------------- WordUnderline ........................................ Syntax: WordUnderline [On] Without the argument, toggles word-only underlining for the entire selection. If On is nonzero, makes the entire selection word-only under- lining. If On is 0 (zero), removes word-only underlining from the entire selection. ---------------------------------------- ---------------------------------------- WordUnderline() ........................................ Syntax: Log = WordUnderline() Returns 0 (zero) if none of the selection is word underlined; 1 if all of the selection is word underlined; or -1 if part of the selection is word underlined or more than one kind of underlining is used. ---------------------------------------- ---------------------------------------- Write ........................................ Syn: Write [#]StreamNumber, Expressions Writes the arguments to StreamNumber including delimiters so they can be read by the Read statement. ----------------------------------------